I was to fast on this list...  I found the solution reading the manual
better ;)

...
With JPG images, two extra indexes are returned: channels and bits. channels
will be 3 for RGB pictures and 4 for CMYK pictures. bits is the number of
bits for each color. 

Beginning with PHP 4.3, bits and channels are present for other image types,
too. However, the presence of these values can be a bit confusing. As an
example, GIF always uses 3 channels per pixel, but the number of bits per
pixel cannot be calculated for an animated GIF with a global color table. 
...



-----Original Message-----
From: SED [mailto:[EMAIL PROTECTED]
Sent: 9. janúar 2004 09:51
To: [EMAIL PROTECTED]
Subject: [PHP] Is it possible to see if a jpeg is RGB or CMYK via PHP GD2?

I'm allowing user to upload images to a gallery. However, some user seem to
have both RGB and CMYK jpeg images. I get an error from ImageCreateFromJPEG
when the script is creating thumbnails from a CMYK jpeg. Can I somehow see
if the image is RGB or CMYK, so I know when to skip the automatic thumbnail
creation?
 
Regards,
SED

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to