I am using PHP/GD to resize a photo to a smaller size and my problem is that when I show the result in Firefox, it looks different from the original. The picture has more contrast, especially the dark areas are even darker. When I show the result in Internet Explorer or the Windows Photo Viewer it looks the same as the original photo.
The problem also only occurs when I resize the photo with PHP/GD. When I resize it with Adobe Lightroom, then the result looks correct in Firefox and Internet Explorer.
Here is an example:
With PHP/GD: http://www.the-ninth.com/demo/demo_php.jpg
With Adobe Lightroom: http://www.the-ninth.com/demo/demo_lightroom.jpg
When comparing the two photos in Firefox you'll see the difference. In IE they look nearly the same.
I am using the following functions to resize:
ImageCreateFromJpeg to read the original image,
ImageCreateTrueColor to create the new image,
ImageCopyResampled to write the resized image to the new image and
ImageJpeg with quality 100 to save the new image.
Before saving I sharpen the new image. However that is not the problem, I already tried without sharpening and the picture still looks different in Firefox.
Any ideas what I am doing wrong?
Thanks and regards, Robert