Re: [GD-DEVEL] gdImageCopyResampled issue under XP

[email protected] ("Florent Lejeune")
Newsgroups php.gd.devel
Message-ID <012201c7ba6d$f702dcb0$6e01a8c0@i3000>
The attachement is too big so you'll find the images at the following urls :

http://floyanami.free.fr/images/CopyResampled_debug.png
http://floyanami.free.fr/images/CopyResampled_release.png

Florent

----- Original Message ----- 
From: "Pierre" <[email protected]>
To: "Florent Lejeune" <[email protected]>; <[email protected]>
Sent: Friday, June 29, 2007 6:26 PM
Subject: Re: [GD-DEVEL] gdImageCopyResampled issue under XP


> Hello,
>
> On 6/29/07, Florent Lejeune <[email protected]> wrote:
>> Hi,
>>
>> I'm using gd 2.0.34 with VS 2005 under Windows XP.
>> I have a problem with the gdImageCopyResampled function which doesn't 
>> produce the same result when my project is compiled in debug and when 
>> it's compiled in release : in debug the final png image is fine but in 
>> release some colors are degraded (see the 2 images attached).
>
> Can you upload them somewhere or use our issues tracker to post them
> (within a new issue)?
>
>>
>> Here is my test code :
>>
>> void bugcopyresample()
>> {
>>   FILE *outpng,*inpng;
>>   int white;
>>   gdImagePtr dst,src;
>>   // build dst image
>>   dst = gdImageCreateTrueColor(100,100);
>>   white = gdImageColorAllocate(dst,255,255,255);
>>   gdImageAlphaBlending(dst,0);
>>   gdImageFill(dst, 0, 0, white);
>>   // open src image
>>   inpng = fopen("testimage.png", "rb");
>>   if (inpng!=NULL)
>>   {
>>     src=gdImageCreateFromPng(inpng);
>>     fclose(inpng);
>>   }
>>   if (src!=NULL)
>>   {
>> 
>> gdImageCopyResampled(dst,src,0,0,0,0,dst->sx,dst->sy,src->sx,src->sy);
>>     // SAVE TO PNG
>>     outpng = fopen("bugCopyResampled.png","wb");
>>     if (outpng!=NULL)
>>     {
>>       gdImagePng(dst,outpng);
>>       fclose(outpng);
>>     }
>>     gdImageDestroy(src);
>>   }
>>   gdImageDestroy(dst);
>> }
>>
>> Is there a solution or will there be a patch ?
>
> Surely, I receiven a couple of suspect reports this week. It is time
> to take a deep look at this function.
>
> --Pierre
>
> -- 
> GD Devel Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.