I'm working on comparing images but having problems setting the output to be RGB.
'convert image.jpg -strip -normalize -resize 4x4! +profile "*" -colorspace sRGB output.png'
I've tried profile instead of colour space '-profile "C:\ImageMagick\sRGB_v4_ICC_preference.icc"'
Which is correct?
The idea is to resize an image to 4x4 then get the RGB values for it, I'm expecting to get 48 numbers between 0 and 255, I get about 333 numbers.
4*4*3 = 48
Width*Height*(R+G+B) = 48
I guess this is because when I read the image with PHP it's reading the headers and other file bits not just the image section, how can I do this?
Thanks for reading.
Using Windows and PHP.
Getting RGB for an Image, CMD or PHP
-
- Posts: 1
- Joined: 2012-01-23T05:04:37-07:00
- Authentication code: 8675308
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Getting RGB for an Image, CMD or PHP
what colorspace is your original image? can you post a link to it? profiles is the proper way to convert for color accuracy. see http://www.imagemagick.org/Usage/formats/#profiles