[problem solved] -> Is it possible to see if a jpeg is RGB or CMYK via PHP GD2?
From: Sed (sed_at_sed.is)
Date: 01/09/04
- Next message: tan: "DBG Debugger and Nusphere"
- Previous message: Julien Wadin: "RE: [PHP] detecting flash in php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: <php-general@lists.php.net> Date: Fri, 9 Jan 2004 10:05:10 -0000
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:sed@sed.is]
Sent: 9. janúar 2004 09:51
To: php-general@lists.php.net
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
- Next message: tan: "DBG Debugger and Nusphere"
- Previous message: Julien Wadin: "RE: [PHP] detecting flash in php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|