[SOLVED] PCD file suppert.

corean
corean's picture

Joined: 2002-09-24
Posts: 37
Posted: Tue, 2005-05-24 01:29

Kodak Photo CD Fornmat not supported.

Perhaps support plan??

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-05-24 04:08

what would it mean to "support" this format?
can imagemagick or netpbm convert this format to jpeg?

 
corean
corean's picture

Joined: 2002-09-24
Posts: 37
Posted: Tue, 2005-05-24 10:15

Yes,
I use Imagemagick..
not convert PCD -> jgp.

This question is ask for imagemagick.org ?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-05-24 11:01

corean, what exact imagemagick call do you use?

we're talking about converting it to jpg, because usually, you;d like to see a preview of the photo in a webbrowser. and i assume internet explorer, firefox, ... can't display this kodak photo cd format.
therefore we need to convert this format to jpg, just for the preview in the webbrowser.

if you don't need such a preview, then G2 already does what you want. you can upload this kodak photo cd files to G2, but you'll only get a download item link, no preview.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-05-24 15:32

corean, can you post a link to a sample pcd file?

 
corean
corean's picture

Joined: 2002-09-24
Posts: 37
Posted: Wed, 2005-05-25 11:43

same CMYK sample link :
http://gallery2.corean.biz/main.php?g2_view=core:ShowItem&g2_itemId=31590

convert *.pcd *.jpg -> jpg thumbnail created.

I want user can view preview-image, Clink download link.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-05-25 16:03

Photo-cd support added.. update from cvs in a few hours or get tomorrow's nightly snapshot.. after core and imagemagick upgrade you can upload pcd and see viewable jpeg image and thumbnail. G2 still has the original pcd file but we don't yet have a link to download it (same problem for raw, tiff, etc).. we plan to add that. See this task.

 
corean
corean's picture

Joined: 2002-09-24
Posts: 37
Posted: Thu, 2005-05-26 00:01

Thanks for midless

reguard.

 
corean
corean's picture

Joined: 2002-09-24
Posts: 37
Posted: Fri, 2005-07-22 08:14

I can't support PCD file.

http://gallery2.corean.biz/main.php?g2_view=core.ShowItem&g2_itemId=30852

Version : ImageMagick 6.2.3 (Test Settings in ImageMagick Settings)
The ImageMagick module can support files with the following MIME types:
image/gif image/jpeg image/pjpeg image/png image/tiff image/svg+xml
image/bmp application/pdf application/postscript application/photoshop
image/jpeg-cmyk image/tiff-cmyk <- not pcd file.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-07-22 08:51

i can confirm the issue:

- downloaded corean's test .pcd
- g2 doesn't create a thumbnail
- convert IMG0020.PCD foo.jpg
works
- identify IMG0020.PCD
returns:
IMG0020.PCD PCD 768x512 DirectClass 4.6mb 0.270u 0:01

edit: see:
http://sourceforge.net/tracker/index.php?func=detail&aid=1242922&group_id=7130&atid=107130

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-07-22 16:34

mindless fixed it. get the fix with tomorrows nightly snapshot.
you'll have to hit save settings again after you got the new version.
(you only have to replace modules/imagemagick/classes/ImageMagickToolkitHelper.class)

 
corean
corean's picture

Joined: 2002-09-24
Posts: 37
Posted: Thu, 2005-07-28 02:41

thx. mindless.

what's save settigns?
G2 cannot create thumbnail upload PCD file after cvs update.

Quote:
ImageMagick Test Setting:

Version
ImageMagick 6.2.3

Supported MIME Types
The ImageMagick module can support files with the following MIME types:

image/gif
image/jpeg
image/pjpeg
image/png
image/tiff
image/svg+xml
image/bmp
application/pdf
application/postscript
application/photoshop
image/x-photo-cd <- :o
image/jpeg-cmyk
image/tiff-cmyk

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-07-28 10:19

in site admin -> imagemagick, you have 3 buttons, save, test and cancel.
just hit save.

 
corean
corean's picture

Joined: 2002-09-24
Posts: 37
Posted: Fri, 2005-07-29 01:31

Thanks.

Well done.

 
saidts

Joined: 2007-03-27
Posts: 44
Posted: Wed, 2007-09-12 20:12

Valiant / Mindless,

There is a way to convert PCD to the maximum resolution? The higher resolution of my PCD's files is 3072x2048! But all are convertes by imagemagick to 768x512.

Thanks in advance!

 
saidts

Joined: 2007-03-27
Posts: 44
Posted: Wed, 2007-09-12 20:21
saidts wrote:
Valiant / Mindless,

There is a way to convert PCD to the maximum resolution? The higher resolution of my PCD's files is 3072x2048! But all are convertes by imagemagick to 768x512.

Thanks in advance!

I found the answer on Imagemagick website:
"The maximum resolution written is 768x512 pixels since larger images require huffman compression (which is not supported)."

:(

 
Taper

Joined: 2008-01-23
Posts: 1
Posted: Wed, 2008-01-23 01:28
Quote:
Quote:
There is a way to convert PCD to the maximum resolution? The higher resolution of my PCD's files is 3072x2048! But all are convertes by imagemagick to 768x512.

I found the answer on Imagemagick website:
"The maximum resolution written is 768x512 pixels since larger images require huffman compression (which is not supported)."

This isn't quite right. That's the maximum resolution of a PCD file that ImageMagick can _write_. When you _read_ a PhotoCD file, to get the higher resolutions, you need to specify what "sub-frame" to use from the multiple images stored in the PCD file. For the 3072x2048 (or 2048x3072, depending on orientation) size, that's frame 5, so you'd specify that frame on the convert command line, like so:

convert "IMG0020.PCD[5]" IMG0020.jpg

G2 could, presumably, add this in as the default behavior.

Note that, with ImageMagick 6.2.8, every PCD I've done this to has given the error message:

convert: Corrupt PCD image, skipping to sync byte `03.PCD'.

but worked anyway. I've not seen this error on lower frames ([1]-[4]), but again, those are lower resolutions.

(Sorry about jumping in on an old thread, but I was working with PCD conversion today and found all this out.)

Taper.

 
saidts

Joined: 2007-03-27
Posts: 44
Posted: Thu, 2008-07-24 17:58

I found how to implement the code to G2

After the following lines into ImageMagickToolkit.class file:

case 'image/jpeg-cmyk':
case 'image/tiff-cmyk':
case 'application/photoshop-cmyk':
if (substr($outputMimeType, -5) != '-cmyk') {
$command[] = '-colorspace';
$command[] = 'RGB';
}
break;

Add these lines:

case 'image/x-photo-cd':
/*
* PCD images in highest resolution
*/
$sourceFilename .= '[5]';
break;
}

Note: I don't test this with PCD files that doesn't have the 5th page!

 
saidts

Joined: 2007-03-27
Posts: 44
Posted: Tue, 2008-08-19 11:51

There is an bug when I replicate a PCD file: the replica turns to 768x512 :(

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2008-08-23 21:11

Guys, please start a new thread on this. This topic was marked as solved 3 years ago, the devs are busy working on the next release and might not notice, see or just plain ignore the thread. Also, your problems are not related to the original topic, adding support to this format.

I'm locking the thread.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here