Opened 9 years ago

#4444 new defect

Transparency gets lost when scaling pal8

Reported by: Carl Eugen Hoyos Owned by:
Priority: normal Component: swscale
Version: git-master Keywords: pal8 alpha
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

$ ffmpeg -i alpha.png -s 168x168 out.png
ffmpeg version N-71320-gc4b2017 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      54. 22.100 / 54. 22.100
  libavcodec     56. 34.100 / 56. 34.100
  libavformat    56. 29.100 / 56. 29.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 13.101 /  5. 13.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, png_pipe, from 'alpha.png':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: png, pal8, 21x21 [SAR 5:6 DAR 5:6], 25 tbr, 25 tbn, 25 tbc
Output #0, apng, to 'out.png':
  Metadata:
    encoder         : Lavf56.29.100
    Stream #0:0: Video: apng, pal8, 168x168 [SAR 5:6 DAR 5:6], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.34.100 apng
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> apng (native))
Press [q] to stop, [?] for help
[apng @ 0x36fd040] Only a single frame so saving as a normal PNG.
frame=    1 fps=0.0 q=0.0 Lsize=       4kB time=00:00:00.04 bitrate= 823.4kbits/s
video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: 24.418253%

The output file is opaque.

Attachments (1)

alpha.png (1.2 KB ) - added by Carl Eugen Hoyos 9 years ago.

Download all attachments as: .zip

Change History (1)

by Carl Eugen Hoyos, 9 years ago

Attachment: alpha.png added
Note: See TracTickets for help on using tickets.