finding resolution?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
fcaserio
Posts: 26
Joined: 2007-03-19T15:22:12-07:00

finding resolution?

Post by fcaserio »

Can ImageMagick find image resolution?
When I apply image conversion from EPS to JPG ImageMagick applies a default 73dpi conversion, and I have to declare the image resolution to prevent data loss.
Can I make the conversion without declaring the resolution and no data loss?
If not, can ImageMagick find image resolution?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: finding resolution?

Post by anthony »

That is the big question, and one i would love to answer to myself.
however no it does not seem to be posible. It would be good is ghostscript has some method of extracting raster images from postscript and PDF files as is, but that does not seem to be the case either. :(
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
fcaserio
Posts: 26
Joined: 2007-03-19T15:22:12-07:00

Re: finding resolution?

Post by fcaserio »

ops, sorry... I wrote my reply on the report tool. Let me answer on the proper area...

I found that some versions of photoshop writes a XML string with the resolution and other params after the binary code on EPS files. I dont think it is reliable to read resolution from this XML because I think if the file was not created by Photoshop the XML is not present.
tks any way...

Can I make another question about EPS? If the EPS file has a clipping path, when IM converts it to JPG the area outside the clipping path is discarted. Is there anyway to discard the clipping path before the conversion?
tks again
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: finding resolution?

Post by anthony »

Only but modifying the EPS file, as it would have to be done before ghostscript rasterises it.

IM itself will only apply the clipping path is -clip is specified, but that will only work with the original JPEG file, and not a ghostscript converted EPS image.

If you find more info on that XML, or find other methods of extracting raster images from Postscript, then PLEASE let me know. This is probably something that should be addressed to the ghostscript developers, as ghostscript is probably in the best position to see raster images before they are 'drawn' at the requested resolution.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply