Detecting CYMK jpeg images
Richmond Mathewson
geradamas at yahoo.com
Sat Feb 7 10:35:23 EST 2009
First time I posted this the bottom got lopped off!
-----------------------------------------------------
Richmond's crude method:
Ben Rubinstein sent me 2 jpegs: one RGB and one CMYK,
I imported them into a stack with 2 buttons ('INFO' and 'INFO') and
one field ('fINFO'): button 'INFO' had this script:
on mouseUp
put the imagedata of img "revbannerRGB.jpg" into fld "fINFO"
end mouseUp
button 'INFO 2':
on mouseUp
put the imagedata of img "revbannerCMYK.jpg" into fld "fINFO"
end mouseUp
- rocket science :) -
now the imageData for the RGB image is the expected load of
"goobledegook", however the imageData for the CMYK image is
very odd indeed; consisting of hundreds of regular characters
preceded by a '¬'.
Now all you need is to look for the '¬' sets to know that your imported JPEG is CMYK rather than RGB.
sincerely, Richmond Mathewson.
____________________________________________________________
A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________
More information about the use-livecode
mailing list