Changes color on upload

See all posts Reply

Changes color on upload new!
by Halffull, 10 years, 10 months ago
Hi all,

I'm new with this library so i could be a very simple question.
I use this script to upload img's only in my handle i have :

$handle->image_convert = 'png';
$handle->allowed = array('image/*');
$handle->image_text            = 'Hello';
$handle->image_text_direction  = 'v';
$handle->image_text_background = '#000000';
$handle->file_new_name_body = $var1.$var1;
$handle->image_text_font       = 3;
$handle->image_text_position   = 'BL';
$handle->image_text_padding_x  = 2;
$handle->image_text_padding_y  = 8;

It works nice, it makes a image with a watermark.

But the colors are changed of the images i upload.

If i look at the images i see a big diffrence in the bright colors.
THe bright colors are much less bright.

Is it because i change it to png?
Or is it something else ?Reply
Re: Changes color on upload new!
by colin, 10 years, 10 months ago
Could you send me on example of original image, and its processed version?

Generally speaking, if you manipulate images (with GD, which the class uses), you may loose some quality. Any resizing, recompression, etc... induces a quality loss.Reply
Re: Changes color on upload new!
by Halffull, 10 years, 10 months ago
http://i40.tinypic.com/xree1.jpg

Original:

http://i41.tinypic.com/2z6cze9.jpg


You see it the best if you look at the trees. the original is much briter.
I have tryd changin convert file to jpg but same result.Reply
Re: Changes color on upload new!
by Halffull, 10 years, 10 months ago
I gues tinypic is useing the same script cause it is converted there to, can i send it with e-mail?Reply
Re: Changes color on upload new!
by colin, 10 years, 10 months ago
I's OK, I can see the difference of colors (you can display the raw image in tinypic).

In your original JPEG, do you have a color profile (like sRGB and Adobe RGB)?

In any case, you will loose some quality. But I would have expected that it wouldn't change the colors so much.Reply
Re: Changes color on upload new!
by Halffull, 10 years, 10 months ago
How can i check if i have a color profile?
is it possible it has something to do with jpeg_quality, i see its default 85.Reply
Re: Changes color on upload new!
by Halffull, 10 years, 10 months ago
it says sRGB i gues this is what you meant.Reply
Re: Changes color on upload new!
by colin, 10 years, 10 months ago
You can certainly try to increase the JPEG quality setting.Reply
Re: Changes color on upload new!
by Willem, 9 years, 2 months ago
Hi, I have been using your upload class with a lot of pleasure! But just the other day I noticed color changes after the create thumbnail function did it's thing. Turns out the file is stripped of its color profile (Adobe RGB). Is there any way to preserve the color profile after the image is resized?

Thanks!Reply
Re: Changes color on upload new!
by colin, 9 years, 2 months ago
I am afraid the class (GD in fact) doesn't take the color profile into account. The class cannot deal with it as of now, but it could be implemented in the future, using such code as this.Reply