Re: [GD-DEVEL] Load Image Posterizing
[email protected] (Pierre Joye) Fri, 8 May 2009 22:01:59 +0200
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
hi, Your script did not make it. Can you attach it as .txt or post a link to it please? Cheers, On Thu, May 7, 2009 at 9:23 AM, Alex Dodge <[email protected]> wrote: > Hello. I am using GD 2.0.34 with Perl and am running into a snag. > Firstly, I hope this is the right forum for Perl questions. I believe > my problem is with GD not Perl, but if this isn't the right venue, I'd > appreciate being redirected. > > I'm trying to load an image and access the pixel data. However, I'm > noticing that GD seems to be posterizing the image when I load it, so > I'm not getting all the colors. I suspect I'm doing something wrong. > > Attached is a perl script that shows the problem. When I run it on, > for example, this image: > http://upload.wikimedia.org/wikipedia/commons/4/4a/Colorful_pottery.jpg > > I get this: > > $ ./imgavg.pl Colorful_pottery.jpg > 202 colors. > > I'm fairly certain that that image has more than 202 colors, so I'm > wondering where I'm going wrong. Any help would be appreciated. > > Thank you very much. > > Alex Dodge > http://alexdodge.net/ > > > -- > GD Devel Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Pierre http://blog.thepimp.net | http://www.libgd.org