CMYK photos and piceditor.php CMYK photos and piceditor.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CMYK photos and piceditor.php

Started by sjordan, July 29, 2006, 03:16:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sjordan

I have searched the forum and found that GD has problems with CMYK images, but I'm using ImageMagik

I have successfully uploaded a CMYK jpg file. The thumbnail and normal sizes were created and I can view the image in the album.

The only area that seems to have trouble is when I click "crop and rotate', the picEditor.php popup page is blank.

Anyone with similar experience and/or have solved this?

thanks in advance.

cpg v. 1.48

OmegaGOD

sjordan,

Is there a reason why you are using CMYK for display purposes? CMYK is a subset of the RBG color space and all monitors display using RBG color space. I think if you convert your images to RGB, you will solve your problem. Because RGB is a larger color space, you won't be losing any color depth when converting.

Hope this helps.

--OmegaGOD
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

sjordan

I'm personally not using CMYK. I allow users to create albums and upload photos. One of my users actually tried to upload the photo and notified me of the errors.

So in this instance, I was more concerned with my user's experience. Doesn't look good if my gallery is throwing errors.

Thank you.

Joachim Müller

Well, users could make all kinds of mistakes or try to upload broken images of all types. You won't be able to get rid of error messages that happen when the users does something wrong. You already realized that part of the problem lies in the image library coppermine uses. This being said, coppermine doesn't have total control over images uploaded, but uses GD or ImageMagick - you could hardly instruct those libraries to do anything else but throw an erro, which is subsequently being displayed within coppermine. There are several other user errors that could result in similar things (e.g. renaming a file from foobar.bmp to foobar.jpg and subsequently uploading such a wannabe-jpeg to the gallery; although some desktop apps are tolerant towards such user errors, the image libraries coppermine uses are not).
Bottom line: as OmegaGOD suggested, there's little you could possibly do to avoid such errors in the future.

sjordan

#4
OmegaGOD & GauGau:

Thank you both. It's not so much that an error message is being displayed. Rather, it seemed odd that the photo was successfully uploaded (apparently) -- evidenced by the fact that the thumb_ and normal_ files were created. I can see the thumbnail and the normal photo when I navigate to displayimage.php, but clicking on picEditor.php renders a blank screen. So, it seems more a mysterious matter on inconsistent. One would expect that if the file got successfully pass the upload stage then each subsequent interaction should be successful.

Bottom line (to borrow a line from GauGau): I'm more intrigued by why would the upload, thumbnail and normal creation work, then other displays not work (all within the same CPG install).

Joachim Müller

Hm, not sure about that: GD can't handle CMYK pics at all, so it shouldn't be capable to create thumbnails from such files. I'm not sure about ImageMagick though. However, the set of commands issued by PHP to create a thumbnail differs from the commands issued on the piceditor screen. So this discrepany may be caused by some commands being more tolerant against "exotic" files than others.
After all, I wouldn't be too bothered about this though - should happen only rarely, as most users don't even have pic editors that support CMYK, so there shouldnÄt be many CMYK jpegs around anyway.

sjordan

GauGau:

Thank you. I'll take your advice and not stress it. CPG can't be all things to all people. It's a great program.

I might stick a bit of code into upload.php to check for CMYK images and issue a warning (or even reject the file). From php.net documentation:
Quotegetimagesize with JPG images, two extra indexes are returned: channels and bits. channels will be 3 for RGB pictures and 4 for CMYK pictures.

Thanks again