Hi again,
Ok, thanks for all your answers ! I had a great time...
Now working with IM : Version: ImageMagick 6.8.5-6 2013-05-19 Q16
So...
1. Snibgo :
Code: Select all
convert test.jpg -profile sRGB.icc tx.png
This command seems to need a file called sRGB.icc.
I haven't found such a file on my Ubuntu, so I picked one from an old Windows installation with almost the same name, but with an icm extension.
Then I tried... The result image is clearly clearer, good !
But it's a bit more "yellowish" than the original. I hope you understand and agree that one cannot afford such colour deviation on photos, except maybe on a field of dandelions...
2. fmw42 :
Exactly the same here : a yellowish tint appears on the result image.
3. Snibgo again :
By doing this :
I have extract "something" called xx.icc
(I really don't know what kind of information is contained in an ICC profile, nor "how" one can "see" these informations, anyway...)
After that I have tried using this icc profile as before :
Code: Select all
convert sparse_color.jpg \( test.jpg -profile "xx.icc" \) -gravity northwest -geometry +10+10 -composite test22.jpg
and the image is as dark as with no profile specified. I don't get it.
I have several questions on my mind at this stage ...
- I understand IM is treating pictures without looking if it really contains some profile or not...
Thus, as Anthony said, we are dealing with the original raw data.
Ok, knowing that, I have 2 ideas in mind :
1. Using the Dst_Over option. As told in my first post.
But as the "source" image is no more the the original photo but the sparse_color.jpg file, I lose all the metadata (EXIFS, etc). (And by losing the embedded ICC informations, the colours are fine on the result image, if I'm not wrong).
So, is it possible to "copy" all the metadata from the original photo to the sparse_color.jpg file before overlaying them (or to the final output file after execution of the overlaying) ?
And how do I tell the photo to get a transparent border to reach exactly the same size as the sparse_color.jpg file so that I do not lose the borders in the result ?
or 2. Trying to find out what's is "wrong**" (maybe it's before using IM, I don't know yet) to make IM taking into consideration the right profile so that the script stays universal. I.e. I need to treat several pictures taken with different cameras, or post-processed within different softwares... Without having to tweak the script for each different users files...
Any other good ideas are of course welcome, if any.
** I have observed several strange behaviours within different images viewers and images sources.
For example ; when viewing a "directly-out-of-a-Nikon-camera" jpeg file with "Eye of gnome" (default viewer in Ubuntu) and the same image but "exif-cleared" (with exiftool -all= imagename.jpg) ; the two images are exactly the same in the viewer. But their thumbnails aren't in Nautilus (the Ubuntu files explorer). Their differences are also shown when these images are opened with : The Gimp, Firefox and the display command if IM for example. This was on a Nikon picture...
This behaviour seems to be inverted with a Canon picture... For example, with a such a picture, the display command does not show any differences, but the image viewer does.
It's kinda puzzling... I really have to do some more testing to understand all that clearly...