Opened 13 years ago
Closed 13 years ago
#707 closed enhancement (fixed)
iff: support transparency
Reported by: | ami_stuff | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avcodec |
Version: | git-master | Keywords: | iff alpha |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
C:\>ffmpeg -i DpaintTitle.brush ffmpeg version N-35295-gb55dd10, Copyright (c) 2000-2011 the FFmpeg developers built on Nov 30 2011 00:52:52 with gcc 4.6.2 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger - -enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable- libxvid --enable-zlib libavutil 51. 29. 1 / 51. 29. 1 libavcodec 53. 39. 1 / 53. 39. 1 libavformat 53. 22. 0 / 53. 22. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 50. 0 / 2. 50. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 [iff_byterun1 @ 020B90E0] Transparency not supported Last message repeated 1 times [IFF @ 020B2320] Estimating duration from bitrate, this may be inaccurate Input #0, IFF, from 'DpaintTitle.brush': Metadata: title : DPaint 5 Title artist : Geoffrey Rantala copyright : 1994, Electronic Arts Duration: N/A, bitrate: N/A Stream #0:0: Video: iff_byterun1 (ILBM / 0x4D424C49), pal8, 275x84, SAR 44:5 2 DAR 3025:1092, 90k tbr, 90k tbn, 90k tbc At least one output file must be specified
C:\>ffmpeg -i 1.lbm ffmpeg version N-35295-gb55dd10, Copyright (c) 2000-2011 the FFmpeg developers built on Nov 30 2011 00:52:52 with gcc 4.6.2 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger - -enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable- libxvid --enable-zlib libavutil 51. 29. 1 / 51. 29. 1 libavcodec 53. 39. 1 / 53. 39. 1 libavformat 53. 22. 0 / 53. 22. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 50. 0 / 2. 50. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 [iff_ilbm @ 020B90E0] Transparency not supported Last message repeated 1 times [IFF @ 020B2320] Estimating duration from bitrate, this may be inaccurate Input #0, IFF, from '1.lbm': Duration: N/A, bitrate: N/A Stream #0:0: Video: iff_ilbm (PBM / 0x204D4250), pal8, 21x21, SAR 5:6 DAR 5 :6, 90k tbr, 90k tbn, 90k tbc At least one output file must be specified
Attachments (5)
Change History (15)
by , 13 years ago
by , 13 years ago
Attachment: | DpaintTitle.brush added |
---|
comment:1 by , 13 years ago
Component: | undetermined → avcodec |
---|---|
Keywords: | iff alpha added |
Priority: | normal → wish |
Reproduced by developer: | set |
Status: | new → open |
Type: | defect → enhancement |
Version: | unspecified → git-master |
comment:2 by , 13 years ago
The attached patch seems to work correctly with "DpaintTitle.brush" file, hoever it fails with iff ilbm files which I created with different background colors selected as transparent.
maybe this info will be useful:
http://home.comcast.net/~erniew/lwsdk/docs/filefmts/ilbm.html
by , 13 years ago
comment:3 by , 13 years ago
Works fine here with my patch:
ffmpeg -i brown.brush -pix_fmt rgb32 out.png
(out.png has transparent background)
comment:4 by , 13 years ago
Right, it works with -pix_fmt rgb32. I tested without it and only "dpainttitle.brush" converted with transparency.
ffmpeg -i *.brush out.png
comment:5 by , 13 years ago
I fixed ffmpeg -i brown.brush out.png earlier today (unrelated to iff).
Please try to always add a failing command line (ffmpeg -i brown.brush out.png) and complete, uncut output, it makes understanding a problem much easier.
comment:6 by , 13 years ago
if (s->masking & !MASK_HAS_TRANSPARENT_COLOR != MASK_NONE) { av_log(avctx, AV_LOG_ERROR, "Masking not supported\n"); return AVERROR_PATCHWELCOME; }
This check seems to fail (allow decoding) file from ticket #705, so maybe something like this:
if (s->masking && s->masking != MASK_HAS_TRANSPARENT_COLOR) { av_log(avctx, AV_LOG_ERROR, "Masking not supported\n"); return AVERROR_PATCHWELCOME; }
Also I have created HAM8 file with transparency (and this seems to set automaticly masking as well), but maybe it would be ok to apply this patch and experiment with HAM8 sample when masking will be supported?
by , 13 years ago
Attachment: | brown_ham8.brush added |
---|
by , 13 years ago
Attachment: | patchifftransparency.diff added |
---|
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Patch attached.