Skip to main content
Known Participant
August 17, 2009
Answered

How to find out the embedded raster images resolution?

  • August 17, 2009
  • 1 reply
  • 2005 views

Is it possible to find out the embedded raster images resolution in illustrator cs3 file through scripting? Please advise me the possibilities and solution.

Thanks for looking into this..

This topic has been closed for replies.
Correct answer

You should be able to retrieve the PPI of an embedded image with something like this:

var imgPixels = RasterItem.boundingBox[2];

var imgWidth = RasterItem.width;

var imgRes = imgPixels/actWidth*72;

1 reply

Correct answer
August 18, 2009

You should be able to retrieve the PPI of an embedded image with something like this:

var imgPixels = RasterItem.boundingBox[2];

var imgWidth = RasterItem.width;

var imgRes = imgPixels/actWidth*72;

Known Participant
August 18, 2009

Thanks for your help!

Larry G. Schneider
Community Expert
Community Expert
August 18, 2009

But if the if the image has been scaled disproportionately it won't be a true PPI by using only one dimension.