• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Total pixels in the Image

Explorer ,
Jul 09, 2019 Jul 09, 2019

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

TOPICS
Scripting

Views

434

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 09, 2019 Jul 09, 2019

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 09, 2019 Jul 09, 2019

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 10, 2019 Jul 10, 2019

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 10, 2019 Jul 10, 2019

Copy link to clipboard

Copied

If possible can you please help me with the script Photoshop.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2019 Jul 11, 2019

Copy link to clipboard

Copied

Photoshop has a Scripting Forum of its own: Photoshop Scripting

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 11, 2019 Jul 11, 2019

Copy link to clipboard

Copied

LATEST

Thanks for the reply.

An script in Indesign will also do.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines