SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    San Diego, CA (USA)
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP/GD: Convert CMYK image to RGB?

    Hi.

    I have written a thumbnail class in PHP with GD functions. What it does is pretty obvious - it takes an image and generates a thumbnail from it.

    There is one problem with the uploader. When the format is .jpg and the color profile is CMYK, the system fails to generate a thumbnail. Apparently, the only way it will successfully handle a .jpg is if its color profile is RGB.

    Is there a way that I can have php detect if the image is in CMYK format? And is it possible to convert an image from CMYK to RGB using php?

    Thanks in advance.

  2. #2
    SitePoint Member
    Join Date
    Apr 2005
    Location
    Nicosia, Cyprus
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you try to use imagemagick instead of gd?

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    San Diego, CA (USA)
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right now, I am limited to GD.

  4. #4
    SitePoint Member
    Join Date
    Apr 2005
    Location
    Nicosia, Cyprus
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is your GD version? Changelog says that basic CMYK support was added in 2.0.22


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •