user1107888
user1107888

Reputation: 1525

RGB or CYMK image in PHP

In my PHP application, I want to allow only RGB images to be uploaded. Using the getimagesize() function, an array is returned in which one element is channels. Its value is 3 for RGB and 4 for CYMK images.

Now, the problem is for PNG images is that the function returns no channels value. Therefore, how can I check PNG images?

Upvotes: 0

Views: 73

Answers (1)

Bart Friederichs
Bart Friederichs

Reputation: 33511

Easy. PNG doesn't support CMYK.

More info easily found with Google: http://www.prepressure.com/library/file-formats/png

Upvotes: 3

Related Questions