gdImageCopyResampled issue under XP

From: Date: Fri, 29 Jun 2007 16:18:40 +0000
Subject: gdImageCopyResampled issue under XP
Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-215@lists.php.net to get a copy of this message
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). 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 ? Thanks for your help. -- Florent Lejeune Développeur Articque Moulin des Roches 37230 Fondettes France web = http://www.articque.com tel: +33 02 47 49 90 49 fax: +33 02 47 49 91 49

« previous php.gd.devel (#215) next »