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?
finding resolution?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: finding resolution?
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.
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/
https://imagemagick.org/Usage/
Re: finding resolution?
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
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
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: finding resolution?
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.
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/
https://imagemagick.org/Usage/