1-bit images with a color map are loaded as Indexed8, but their lines
were copied packed: the first (width + 7) / 8 bytes (rounded up to an
even number) of each line held packed bits read as indexes, and the rest
of the line was not set, so it kept whatever the memory held (images are
allocated without being initialized). The bits are now unpacked to one
index per pixel.
Added the read test pal1bit.ras, which fails without this change.
Added support for RLE compressed images. This patch makes the player almost complete allowing to read all type 1,2 and 3 RAS files. Only types 4 and 5 are missing which are images converted from TIFF and IFF.
- Progressive load from file
- Added support for 1-bit image
- Images with palette are now Index (instead of RGB32)
- Added options support (Size, Format)
- Added some test cases
- Improved performance by directly accessing the scanline
- Support for more RAS extension (taken from GIMP)
The code should works "as is" also on KF5.
Two main tests: read the file and compare to a given image (loaded from
png), and write a file out and compare to a previously-written image.
The write test in particular is kind of fragile, but it should help
catch some errors where a code change was not intended to affect the
output of the plugin.
Tests are included for all the writable formats, as well as every
readable format that GIMP can write to (and so I could easily get an
example of).
REVIEW: 115430