Incorrect or dull photo colors on upload

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Incorrect or dull photo colors on upload

Postby theluvgunda » Sat Feb 19, 2011 8:31 am

Hi I need some help with photo uploads. I got everything working perfectly including creating several thumbnails of varying sizes for testing. However I am running into problems of photos coming out dull.

My Photos appear colorful in lightroom, Photoshop, and windows live photo gallery and in windows. Except in my browsers.

Heres what I am doing:

1. Upload file to server, get exif Data and then rename and use move_uploaded_file to main user folder.
2. Copy the original file using copy($file, $newfile)
3. resize copied image using
a.imagecreatefromjpeg
b.imagecreatetruecolor
c.imagecopyresampled
d.imagejpeg
e.imagedestroy

My Questions:
1. is imagecreatetruecolor changing the photo colors?
2. is imagecopyresampled not copying all the colors?
3. is imagejpeg rendering the colors correctly?

Now I have searched the google globe only to find that it is a color profile issue on 1 website. How do i read the correct color profile using php and apply it to the images for correct viewing in browsers?
theluvgunda
Forum Newbie
 
Posts: 1
Joined: Sat Feb 19, 2011 7:58 am

Return to PHPGD.com

Who is online

Users browsing this forum: No registered users and 4 guests