brightness issue converting from tif to png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: brightness issue converting from tif to png
I think you should convert your tif to sRGB before doing any resizing (-thumbnail). Also note that -quality 100 means something totally different for PNG, TIF and JPG. With tiff you need to specify the type of compression. See http://www.imagemagick.org/script/comma ... hp#quality
-
- Posts: 13
- Joined: 2017-08-10T02:16:30-07:00
- Authentication code: 1151
Re: brightness issue converting from tif to png
Hello,
Thanks for your answers:
@fmw42 : thanks to notice me about the quality parameter and their differences. Can it have an impact on the channels ?
If so i will try to make some tests and adjusting quality / compression parameters.
@snibgo :
my problem is that i used IM to do with sRGB tif / jpg / png thumbails using a tif with a CMYK embedded profile.
The tif and jpg thumbnails are ok whereas my png thumbnail have a difference in its channels and looks more lighter.
- Original picture and Thumbnails (~180Mo) -> https://lion.box.com/s/5erw2ucfjr4fqsy0lcc0xjhtnp95d6tv
- Resulting Thumbnails in JPG (OK) and PNG (lighter) (~7Mo) -> https://lion.box.com/s/k5hrvy275h20z131i8awufdbsqvdudnd
Best regards,
Thanks for your answers:
@fmw42 : thanks to notice me about the quality parameter and their differences. Can it have an impact on the channels ?
If so i will try to make some tests and adjusting quality / compression parameters.
@snibgo :
my problem is that i used IM to do with sRGB tif / jpg / png thumbails using a tif with a CMYK embedded profile.
The tif and jpg thumbnails are ok whereas my png thumbnail have a difference in its channels and looks more lighter.
- Original picture and Thumbnails (~180Mo) -> https://lion.box.com/s/5erw2ucfjr4fqsy0lcc0xjhtnp95d6tv
- Resulting Thumbnails in JPG (OK) and PNG (lighter) (~7Mo) -> https://lion.box.com/s/k5hrvy275h20z131i8awufdbsqvdudnd
Best regards,
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: brightness issue converting from tif to png
You linked to these upthread, and I commented on them. Yes, the PNG is slightly lighter than the JPG. JPG compression is lossy, so it is different to the PNG.mnougarede wrote:- Resulting Thumbnails in JPG (OK) and PNG (lighter) (~7Mo) -> https://lion.box.com/s/k5hrvy275h20z131i8awufdbsqvdudnd
snibgo's IM pages: im.snibgo.com
-
- Posts: 13
- Joined: 2017-08-10T02:16:30-07:00
- Authentication code: 1151
Re: brightness issue converting from tif to png
Hi,
I tried to adjust the -quality value since i used 100 before and for PNG it has no meaning following the documentation.
I tried -quality with different arguments but the compression does not impact the resulting channels.
Best regards,
Thanks for your answer, so you mean i won't be able to obtain the same result for a PNG?
I tried to adjust the -quality value since i used 100 before and for PNG it has no meaning following the documentation.
I tried -quality with different arguments but the compression does not impact the resulting channels.
Best regards,
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: brightness issue converting from tif to png
PNG compression is always lossless. That means it never changes pixel values.
JPG compression by IM is always lossy. That means it always changes pixel values. (In theory it might not, but in practice it always does.) So JPG will always give a different result to PNG. The PNG version will be more correct.
With PNG, "-quality" refers to the method of compression, which affects the file size. There is no simple relationship between the quality number and the file size, because the most effective method depends on the type of image.
JPG compression by IM is always lossy. That means it always changes pixel values. (In theory it might not, but in practice it always does.) So JPG will always give a different result to PNG. The PNG version will be more correct.
With PNG, "-quality" refers to the method of compression, which affects the file size. There is no simple relationship between the quality number and the file size, because the most effective method depends on the type of image.
snibgo's IM pages: im.snibgo.com
-
- Posts: 13
- Joined: 2017-08-10T02:16:30-07:00
- Authentication code: 1151
Re: brightness issue converting from tif to png
I tried the 2 commands below without success:
convert original.tif -profile sRGB2014.icc original-sRGB.tif
convert original-sRGB.tif -thumbnail 1280> -profile sRGB2014.icc original-sRGB.png
I really don't want to switch to XnView (nconvert) because i don't understand what introduce the channel differences using IM.
-
- Posts: 13
- Joined: 2017-08-10T02:16:30-07:00
- Authentication code: 1151
Re: brightness issue converting from tif to png
Hello,
I found out that with the command below i got a really good result, but i don't understand technically what does it change.
Is it safe to assume that i could add -define png:exclude-chunk=sRGB on any conversion of tif to png ?
I found out that with the command below i got a really good result, but i don't understand technically what does it change.
Is it safe to assume that i could add -define png:exclude-chunk=sRGB on any conversion of tif to png ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: brightness issue converting from tif to png
What command below? I don't see any full command line! Please be more specific and show the full command line and specify what exactly you do not understand.mnougarede wrote: ↑2017-08-16T10:15:17-07:00 Hello,
I found out that with the command below i got a really good result, but i don't understand technically what does it change.
Is it safe to assume that i could add -define png:exclude-chunk=sRGB on any conversion of tif to png ?
-
- Posts: 13
- Joined: 2017-08-10T02:16:30-07:00
- Authentication code: 1151
Re: brightness issue converting from tif to png
Sorry i forgot to paste the command:
I don't understand why i have to add -define png:exclude-chunk=sRGB to match the colors of my original tif and if it's same to assume that i can add this parameter to all conversion of tif to png.
Best regards,
Code: Select all
convert original.tif -profile sRGB2014.icc -define png:exclude-chunk=sRGB original-exclude-chunk-sRGB.png
Best regards,
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: brightness issue converting from tif to png
Sorry, I cannot answer that.
But this command works fine for me on IM 6.9.6.7 Q16 Mac OSX
I am using libpng 1.6.30 and liftiff 4.0.8. Also perhaps your sRGB profile is not the same as mine or corrupt.
What is your IM version and platform and what versions of libpng and libtiff are you using?
sRGB profiles can be found at http://www.color.org/srgbprofiles.xalter
But this command works fine for me on IM 6.9.6.7 Q16 Mac OSX
Code: Select all
convert originalFL.tif -profile /Users/fred/images/profiles/sRGB.icc originalFL_fred.png
What is your IM version and platform and what versions of libpng and libtiff are you using?
sRGB profiles can be found at http://www.color.org/srgbprofiles.xalter