Copy link to clipboard
Copied
Hi,
Is there a way to know the total number of pixels in an image (i.e. multiplying the dimensions of the image (height and width)).
A software or a Script would be helpful which can tell me the total pixels in the image, and if the pixels are exceeding above the specific 4 million pixels its should get highlight or given us an error message.
Please help me with the same.
Regards
Arvind
Copy link to clipboard
Copied
If you are on a Mac, with AppleScript you have the Image Events application that gives you the following for an image contained in a file:
file type, bit depth, color space, dimensions (the width and height, in pixels), embedded profile - the profile if any
image file - a reference to the file that contains the image
location - the folder or disk that contains the file
name - name of the image
resolution - horizontal and vertical pixel density of the image, in dots per inch
Example:
set theFile to choose file
tell application "Image Events"
set thisImage to open theFile
set theDim to dimensions of thisImage
set totSize to (item 1 of theDim) * (item 2 of theDim)
close thisImage
end tell
totSize
Copy link to clipboard
Copied
Thanks for the reply Hopkins
Unfortunately I don't have MAC, is there a way where we can check the above mentioned in Windows PC.
Or any Preflight in Indesign or Adobe Acrobat.
Regards
Arvind
Copy link to clipboard
Copied
I'm sure there is some way on the PC. Best I could do would be to script Photoshop. Maybe someone else has a better solution.
Copy link to clipboard
Copied
If possible can you please help me with the script Photoshop.
Copy link to clipboard
Copied
Photoshop has a Scripting Forum of its own: Photoshop Scripting
Copy link to clipboard
Copied
Thanks for the reply.
An script in Indesign will also do.