Hi,
I have a high contrast black&white photo. The resize works fine and the brightness is not altered.
When I add a watermark, it suddenly becomes much brighter.
The problem occurs with convert 6.7.7 but not with an older version like 6.5.7 (I have this one on my desktop) and removing the $this->add_command('sampling-factor', '4:2:2' ); doesn't change anything.
I see the options to add the watermark are:
function compose($overlay, $x, $y, $opacity) { $param = 'compose dissolve -define compose:args='.$opacity; $param .= ' '.escapeshellarg(realpath($overlay->image->source_filepath)); $param .= ' -gravity NorthWest -geometry +'.$x.'+'.$y; $param .= ' -composite'; $this->add_command($param); return true; }
rvelices, did you try other settings for watermarking? (so that I don't start "from scratch")
Offline
plg wrote:
rvelices, did you try other settings for watermarking? (so that I don't start "from scratch")
Not really. These settings come from imagick help ... I have no idea why this happens ...
Offline
does the IM version has an impact?
Offline
Yes :-)
plg wrote:
The problem occurs with convert 6.7.7 but not with an older version like 6.5.7
Offline
Just to make sure. If you strip all metadata from the source and you convert, the issue exists ?
Offline
Same problem when I apply "jhead -purejpg" (removes all metadata) on the JPEG file before uploading.
Offline
New interesting test. In Gimp, I have converted the photo to RGB mode (instead of Grayscale) and now the brightness is correct with the watermark.
Offline
Before -compose, if I add:
-colorspace RGB
then we get a nice result :-) the question is "should we always add this option in function compose(...) ?".
Offline
Offline
Is it not in the watermark picture?
i have no problems.
Check http://sportplaatje.nl/index.php?/category/21
Offline
flop25 wrote:
http://www.imagemagick.org/discourse-server/viewtopic.php?t=21632 ?
nice, thank you :-) I'll see what I can do with that!
Offline
sport wrote:
Is it not in the watermark picture?
i have no problems.
Check http://sportplaatje.nl/index.php?/category/21
Your original photo, even if only showing grays, is in RGB mode, not in grayscale. This is certainly why you have no problem.
Using the grayscale mode on a B&W photo is a good idea because it seriously decreases the file size. For example with the photo of the stone house :
* grayscale = 5.3MB
* RGB = 7.4MB
=> +40%
Offline
i did just convert a picture to grey-scale in Photo-shop,
and it all looks good when imported to my web-page with the watermark.
I never did now that, so thx for sharing.
Size is no problem, max size on my site is 1024pixels.
But my print shop, always want all in srgb mode, so we keep it that way.
But what i did mean is, is not the watermark the problem off getting a brighter image, What color profile does it have.
I can be completely wrong, i don't have programming skills or knowing how things work in piwigo.
but is it possible that your image and the watermark both have a exif in it.
And if so, what exif info will be read.
ad first there is the picture, and as a overlay the watermark.
i think the overlay is the one from what piwigo reads the exif or the color profile
Offline
Offline