List Info

Thread: Oddity when handling < 8bpp images.




Oddity when handling < 8bpp images.
user name
2007-03-01 22:22:43
Hello.

I think there's something strange going on with libpng on my
system,
specifically with the handling of low bit-depth images. Now
correct
me if I'm wrong, but the following 8x8 1 bit checkerboard
image:

h
ttp://img98.imageshack.us/img98/7632/gs18x8we8.png

...should, when decompressed to raw pixel data, show the
following
bit pattern when viewed in a binary editor:

10101010 10101010 10101010 10101010 10101010 10101010
10101010 10101010

However, the first byte returned from png_read_row() doesn't
look
like this at all, and the resulting bit pattern for the
image turns
out like this:

11010101 10101010 11010101 10101010 11010101 10101010
11010101 10101010

One bit appears to be duplicated in places.

If my first assumption turns out to be correct, I'll post a
small
tarball of code that shows the symptoms. I'm open to the
suggestion
that the problem is in my code, of course.

thanks,
MC

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
png-mng-implement mailing list
png-mng-implementlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-m
ng-implement

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )