[Scummvm-devel] Moving and merging image-related code

Matthew Hoops clone2727 at gmail.com
Wed Feb 2 18:53:06 CET 2011


On Wed, Feb 2, 2011 at 12:10 PM, Filippos Karapetis <bluegr at gmail.com> wrote:
> Hello
> There was an idea about moving all image related code to its own
> subdirectory within graphics.
> In particular, this would group all of the image formats we support
> together, separately from
> the rest of the graphics code. Perhaps we could somehow merge the way they
> work, so that
> they all have a similar interface. The current image-related code we got
> inside graphics is:
Sounds good to me. A common interface would really be helpful.

> iff.* - ILBM decoder (LBM images)
> imagedec.* - BMP decoder
The BMP decoder is quite limited in what it can do. One could also
merge in the one from Mohawk which has 8bpp support.

> jpeg.*
> pict.* - Mac PICT decoder (PICTs are containers for JPEGs)
PICT images are not just containers for JPEG's. They are much more
complex than that, and we even support its DirectBits/PackBits
decompression, so we've got most basic PICT v2 images covered.

> png.*
As I expressed on IRC, I disagreed with having our own PNG decoder and
I would much rather see libpng used. The dependency on libpng is not
something that would be ridiculous to depend on and we will most
likely never equal the speed of libpng.

> Also, drascula, hugo, queen and tucker all have PCX loading code, so perhaps
> this should be
> merged to a PCX class together with the other image decoders...
Yes, I noticed that too. Queen also provides another LBM
implementation that should probably be switched over to the
aforementioned ILBM decoder.

-Matt




More information about the Scummvm-devel mailing list