In this post, i was wondering why my png files were badly displayed on retina displays.
I finaly found that the problem came from the PNG file itself: when I open it and save it again with photoshop or something else, the problem disapear.
As this post proposed, I used sips command to see what exactly were formed my PNG file. I have the original-image.png
(with the glitch) and the photoshoped-image.png
The command
sips original-image.png -g all
Gives me
pixelWidth: 256
pixelHeight: 256
typeIdentifier: public.png
format: png
formatOptions: default
dpiWidth: 72.000
dpiHeight: 72.000
samplesPerPixel: 3
bitsPerSample: 8
hasAlpha: no
space: RGB
And
sips photoshoped-image.png -g all
Gives me
pixelWidth: 256
pixelHeight: 256
typeIdentifier: public.png
format: png
formatOptions: default
dpiWidth: 72.000
dpiHeight: 72.000
samplesPerPixel: 4
bitsPerSample: 8
hasAlpha: yes
space: RGB
profile: HD 709-A
So 3 differences :
- samplePerPixel
- hasAlpha
- the photoshoped file has a profile.
But these properies are read-only in sips and I wonder how can I change them to understand exactly where the bug comes from.
Any idea ?