[Solved]: GD Image Resize Losing EXIF data [Solved]: GD Image Resize Losing EXIF data
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: GD Image Resize Losing EXIF data

Started by cuteseal, August 14, 2004, 10:56:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cuteseal

Hi,

I just started using coppermine this week and love it!  This is what I've done so far: http://www.shuttertalk.com/gallery

Anyway, my question is this:

I've used a modification to automatically resize images when they exceed the max_height_width.  It works well, except that the resized image does not retain the EXIF data.

Any ideas how I can fix this?

I think the code is something like this:


} elseif (max($imginfo[0], $imginfo[1]) > $CONFIG['max_upl_width_height']) {
// RatKing's hack to resize images that are 'to big' according to the admin
 // Determain which is the tallest width or height.
 if ( $imginfo[0] > $imginfo[1] ) { $tall = 'wd'; } else { $tall = 'ht'; }

 // Simply resize the image to the biggest file size that is allowed.
 resize_image($path_to_image, $path_to_image, $CONFIG['max_upl_width_height'], $CONFIG['thumb_method'], $tall);



Thanks.
Julian

Tarique Sani

GD does not retain EXIF - try using the newer version of ImageMagick instead
SANIsoft PHP applications for E Biz

cuteseal

Thanks Tarique... ImageMagick is... magic :D