[FFmpeg-trac] #8588(avfilter:new): Palettegen adds one color on transparent input

FFmpeg trac at avcodec.org
Sun Mar 29 23:04:54 EEST 2020


#8588: Palettegen adds one color on transparent input
-------------------------------------+-------------------------------------
             Reporter:  RedError     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avfilter
              Version:  git-master   |               Resolution:
             Keywords:  palettegen   |               Blocked By:
  color transparency gif png alpha   |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by RedError):

 Examples: (files joint in zip)
 [[Image(https://i.imgur.com/mCg8eFw.gif)]] Transparent Gif 3 red colors +
 green transparency
 [[Image(https://i.imgur.com/pc0Ck9z.png)]] Resulting palette: White in
 fourth position (because white is bigger than red). Transparent pixel in
 position 256.

 {{{
 [Parsed_palettegen_0 @ 000001f3f6d11b80]
 4(+1) colors generated out of 4 colors; ratio=1.000000
 }}}

 [[Image(https://i.imgur.com/p90IgTq.png)]] Transparent Png 3 red colors +
 green transparency
 [[Image(https://i.imgur.com/VuS6Xin.png)]] Resulting palette: Green in
 second position (because green is smaller than red). Transparent pixel in
 position 256.

 {{{
 [Parsed_palettegen_0 @ 0000028cb16ed1c0]
 4(+1) colors generated out of 4 colors; ratio=1.000000
 }}}


 Expected result:
 [[Image(https://i.imgur.com/dqQJbyY.png)]] Only 3 colors (black, brown,
 red), transparent pixel in position 256.


 ----

 Using generated palettes on this image:
 [[Image(https://i.imgur.com/fNrF9nF.png)]]
 Palette from gif: white color has been added
 [[Image(https://i.imgur.com/rZntUX8.gif)]]
 Palette from png: green color has been added
 [[Image(https://i.imgur.com/y1rNuPD.gif)]]
 Expected result: only red, black, transparency.
 [[Image(https://i.imgur.com/rYk3VrC.gif)]]

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8588#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list