ImageMagick TweakPng and sRGB
Posted: 2010-08-01T19:10:09-07:00
I'm looking for a way to process PNG images to:
- report which have embedded profiles
- for those without embedded profile, insert an sRGB chunk
I've been doing this with TweakPng and getting good results, but you have to do it by-hand for each file, and that won't scale.
Can I do this with mogrify/convert?
On the reporting side, using identify -verbose, is there a way to tell from the output whether the sRGB chunk is present?
Here's a diff of identify's output, and I don't see anything. (On the left is for an image without the sRGB chunk, on the right is the same image after inserting an sRGB chunk with TweakPng.)
55,61c55,61
< Rendering intent: Undefined
< Gamma: 0.45454
< Chromaticity:
< red primary: (0.63999,0.33001)
< green primary: (0.3,0.6)
< blue primary: (0.15,0.05999)
< white point: (0.31269,0.32899)
---
> Rendering intent: Saturation
> Gamma: 0.45454
> Chromaticity:
> red primary: (0.64,0.33)
> green primary: (0.3,0.6)
> blue primary: (0.15,0.06)
> white point: (0.3127,0.329)
75c75
< date:modify: 2007-06-07T08:38:28-05:00
---
> date:modify: 2010-08-01T20:54:53-05:00
82,84c82,84
< Pixels per second: 5.707M
< User time: 0.016u
< Elapsed time: 0:01.013
---
> Pixels per second: 15.98M
> User time: 0.000u
> Elapsed time: 0:01.005
Also, in general, what's the difference between ImageMagick's concept of a profile and TweakPng's sRGB chunk? I don't know a lot about this, but after reading for a couple hours they seem like two related but different things.
Thanks.
- report which have embedded profiles
- for those without embedded profile, insert an sRGB chunk
I've been doing this with TweakPng and getting good results, but you have to do it by-hand for each file, and that won't scale.
Can I do this with mogrify/convert?
On the reporting side, using identify -verbose, is there a way to tell from the output whether the sRGB chunk is present?
Here's a diff of identify's output, and I don't see anything. (On the left is for an image without the sRGB chunk, on the right is the same image after inserting an sRGB chunk with TweakPng.)
55,61c55,61
< Rendering intent: Undefined
< Gamma: 0.45454
< Chromaticity:
< red primary: (0.63999,0.33001)
< green primary: (0.3,0.6)
< blue primary: (0.15,0.05999)
< white point: (0.31269,0.32899)
---
> Rendering intent: Saturation
> Gamma: 0.45454
> Chromaticity:
> red primary: (0.64,0.33)
> green primary: (0.3,0.6)
> blue primary: (0.15,0.06)
> white point: (0.3127,0.329)
75c75
< date:modify: 2007-06-07T08:38:28-05:00
---
> date:modify: 2010-08-01T20:54:53-05:00
82,84c82,84
< Pixels per second: 5.707M
< User time: 0.016u
< Elapsed time: 0:01.013
---
> Pixels per second: 15.98M
> User time: 0.000u
> Elapsed time: 0:01.005
Also, in general, what's the difference between ImageMagick's concept of a profile and TweakPng's sRGB chunk? I don't know a lot about this, but after reading for a couple hours they seem like two related but different things.
Thanks.