Page 1 of 1

Diffferent image depth by "identify -format %z"?

Posted: 2009-10-07T01:43:03-07:00
by butz74
Dear Board

Problem:
When executing the command "identify -format %z", on two different IM versions, I got two different values for the image depth.

Examples:
@server 1, ImageMagick 6.4.1 05/27/08 Q16
identify -format %z original.eps[0] => 16
identify -format %z converted.eps[0] => 16

@server 2, ImageMagick 6.4.1 08/19/08 Q16
identify -format %z original.eps[0] => 4
identify -format %z converted.eps[0] => (NULL)

Information:
- I know, that the original.eps is a 16bit image.
- The image "converted.eps" was created with the command "convert -depth 16 original.eps converted.eps"

PHP erxample script:
<?php
$result = array();
echo "identify version:\n";
$command = "identify -version";
exec($command, $result);
print_r($result);

$result = array();
echo "original.eps:\n";
$command = "identify -format %z original.eps[0]";
exec($command, $result);
print_r($result);

$result = array();
echo "converted.eps:\n";
$command = "identify -format %z converted.eps[0]";
exec($command, $result);
print_r($result);
?>

Does anybody have any suggestions? Thank you!

Greetings

Re: Diffferent image depth by "identify -format %z"?

Posted: 2009-10-07T10:42:12-07:00
by fmw42
why are you appending [0] to your filename? do you have multiple frames or pages? if so and you need to find the size of the first frame then try putting the whole filename in quotes, 'image.eps[0]'

There was a recent post in one of the forums about the same thing and it seemed that an upgrade fixed the problem. So there might be versions of IM that do not for some reason like the [0] at the end of the file in this case.

see viewtopic.php?f=1&t=14754

Re: Diffferent image depth by "identify -format %z"?

Posted: 2009-10-08T00:01:51-07:00
by butz74
I'm appending "[0]" to the filename, because I don't know what type of image I will get (automated processing).
But anyway, putting the whole filename in quotes doesn't change anything ("filename.format[0]" or 'filename.format[0]').

Regarding to the post:
Also leave the notation for the first layer ([0]) doesn't change anything (filename.format[0] -> filename.format).

Is there a difference between IM 6.4.1 05/27/08 Q16 and IM 6.4.1 08/19/08 Q16?? Should I probably update IM? What do you think?

Greetings

Re: Diffferent image depth by "identify -format %z"?

Posted: 2009-10-08T10:56:11-07:00
by fmw42
If you read all the posts on that topic you will see that an upgrade apparently resolved the problem.

Re: Diffferent image depth by "identify -format %z"?

Posted: 2009-10-12T07:56:42-07:00
by butz74
Yes, that I understood ;-). Just was wondering if there is a other solution...
So thank you for your responses, for me the question is answered ;-).

Greetings :-)