ID: 20443 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: GD related Operating System: Linux PHP Version: 4.2.3 New Comment:
Due to ISP limitations, CVS is not an option. Does anyone know exactly where this bug resides? Must be in the GD, but is it in all the copy/resize functions? Any work-arounds? Thanks! Previous Comments: ------------------------------------------------------------------------ [2002-11-15 09:11:07] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-11-15 04:20:02] [EMAIL PROTECTED] Resized images generated from jpg files displaying botched or dimmed colors after update from 4.2.2 to 4.2.3. Example code: # get the data from the original, large image $src_img = ImageCreateFromJPEG($image); # create new image $dst_img = ImageCreate($new_w,$new_h); # allocate colors for background and border $mattecolor = ImageColorAllocate($dst_img,$mr,$mg,$mb); $bordercolor = ImageColorAllocate($dst_img,$br,$bg,$bb); # fill image with matte color ImageFill($dst_img,0,0,$mattecolor); # resize source image and place the copy in the destination image ImageCopyResized($dst_img,$src_img, $margin_x,$margin_y, 0,0,$thumb_w,$thumb_h, $old_x,$old_y); # if there is a border set, draw a rectangle around the thumbnail if ($border==1){imageRectangle($dst_img,0,0,$new_w-1,$new_h-1,$bordercolor);} # create final image and free up the memory ImageJPEG($dst_img); ImageDestroy($dst_img); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20443&edit=1