Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Karlsruhe

macrumors member
Original poster
May 15, 2011
40
5
Hello,
Is there a way via the command line or, other to modify information dimensions from pixels to cm in the mini preview info? It is very usefull but it would be great if in one glance I can see the information I need.

Thank you!
 

Attachments

  • Screenshot 2022-04-07 at 09.46.30.png
    Screenshot 2022-04-07 at 09.46.30.png
    18.1 KB · Views: 170

Ruggy

macrumors 6502a
Jan 11, 2017
980
639
This is an image file?
An image file doesn't have a size in cm. A pixel doesn't have a size in cm.
If you tell whatever you are viewing the image in that it will be viewed at- for example- 144 pixels per inch and it is say 1800 pixels then it will do the math and display it a 31.75 cm.(I know I'm mixing measurements but per inch is more common) I think the maths is correct
But if you tell it that it's 300pixels per inch- which is typically how you would send it to a printer- or 72- which is often how you like to view on the screen- then it will equally sort it out.

If you view an image in the preview app and go Tools 'adjust size' then you can play with pixels, cm, resolution etc and see what you will get.
You should be able to do this on most programs you want to view in and you you may well be able to set up a program to resize an image to your requirements automatically which might help you.
But it isn't going to give you a size unless you define the parameters.
 

Karlsruhe

macrumors member
Original poster
May 15, 2011
40
5
This is an image file?
An image file doesn't have a size in cm. A pixel doesn't have a size in cm.
If you tell whatever you are viewing the image in that it will be viewed at- for example- 144 pixels per inch and it is say 1800 pixels then it will do the math and display it a 31.75 cm.(I know I'm mixing measurements but per inch is more common) I think the maths is correct
But if you tell it that it's 300pixels per inch- which is typically how you would send it to a printer- or 72- which is often how you like to view on the screen- then it will equally sort it out.

If you view an image in the preview app and go Tools 'adjust size' then you can play with pixels, cm, resolution etc and see what you will get.
You should be able to do this on most programs you want to view in and you you may well be able to set up a program to resize an image to your requirements automatically which might help you.
But it isn't going to give you a size unless you define the parameters.
It's an image, yes. How can it not have size in cm? I made it in illustrator and Photoshop - and can see there the size in pixels or cm or in or mm, it's just a click of a button. So an image can have a size in cm.

And yes - I know I can view it and set it in any graphic app, but this is not what I would like. The side panel in osx (called by view>show preview) display a lot of useful informations, and it changes based on the filetype you are viewing.

But I would like to know if there is a hidden (or not so hidden) way to make osx show me the dimensions in cm or mm cos it will help me a lot when checking at a glance the pictures.
 

BigBlur

macrumors 6502a
Jul 9, 2021
642
704
It's an image, yes. How can it not have size in cm? I made it in illustrator and Photoshop - and can see there the size in pixels or cm or in or mm, it's just a click of a button. So an image can have a size in cm.
This is the size of the image in that specific app. If you print it out in that app, it'll be that size. If you open it in another app and print it, it could be a different size. It's also used to control how many pixels per cm/inch the image has when doing photoshop work (this is the resolution).

Ruggy is correct, images don't have a physical size. A pixel is essentially just a dot on the screen and isn't a physical unit of measure. This dot/pixel can be any size physically, so you can't convert pixels into mm, cm, inches, etc. For example, an image that is 2000 pixels wide could be 20 cm wide when printed out on paper (100 pixels per cm, or 0.1mm wide pixels); or it could be 10 meters wide for a large billboard (2 pixels per cm, or 5mm wide pixels). (I italicized pixels because it isn't really considered to be a pixel when printed out. Pixels are only used in the digital space.)

This article and video may be helpful in understanding this concept better.
 
Last edited:
  • Like
Reactions: iStorm

Karlsruhe

macrumors member
Original poster
May 15, 2011
40
5
This is the size of the image in that specific app. If you print it out in that app, it'll be that size. If you open it in another app and print it, it could be a different size. It's also used to control how many pixels per cm/inch the image has when doing photoshop work (this is the resolution).

Ruggy is correct, images don't have a physical size. A pixel is essentially just a dot on the screen and isn't a physical unit of measure. This dot/pixel can be any size physically, so you can't convert pixels into mm, cm, inches, etc. For example, an image that is 2000 pixels wide could be 20 cm wide when printed out on paper (100 pixels per cm, or 0.1mm wide pixels); or it could be 10 meters wide for a large billboard (2 pixels per cm, or 5mm wide pixels). (I italicized pixels because it isn't really considered to be a pixel when printed out. Pixels are only used in the digital space.)

This article and video may be helpful in understanding this concept better.
So, can you please explain to me, how can photoshop, or any other graphic program know how big my image is, in pixels, cm, in etc.?

I know the difference between pixels and cm, and that on my screen i get pixels. I work with this everyday!

The question remains: can the osx show me the dimensions in cm not pixels?
 

Attachments

  • Screenshot 2022-04-08 at 11.37.17.png
    Screenshot 2022-04-08 at 11.37.17.png
    574.9 KB · Views: 75
  • Screenshot 2022-04-08 at 11.37.23.png
    Screenshot 2022-04-08 at 11.37.23.png
    585.2 KB · Views: 65
  • Screenshot 2022-04-08 at 11.37.14.png
    Screenshot 2022-04-08 at 11.37.14.png
    579.8 KB · Views: 71
  • Screenshot 2022-04-08 at 11.37.07.png
    Screenshot 2022-04-08 at 11.37.07.png
    570.4 KB · Views: 61
  • Screenshot 2022-04-08 at 11.37.29.png
    Screenshot 2022-04-08 at 11.37.29.png
    576.6 KB · Views: 70

chabig

macrumors G4
Sep 6, 2002
11,279
8,981
An image has dimensions in pixels. It also has resolution metadata associated with it that identifies how many pixels there are per inch. Photoshop and other graphics programs are just dividing those two to get the dimension in units of length. But the resolution can be changed to any number and the image will shrink or grow on an actual page. It's not an inherent characteristic.

Your original question was whether Finder or Preview could be told to report the length and width of an image in length units. I don't think so.
 

Karlsruhe

macrumors member
Original poster
May 15, 2011
40
5
Oh, but it is - I can make the image, that I see in pixels on my screen bigger or smaller or the same but increase the resolution. If I give the print shop an image that is not 300 dpi an the exact dimension that they require (say per example A4) - I will get it back with "no good" replay.


Yes, it's a conversion /math I don't know the exact system behind it, but yeah, you can convert from pixels to cm. Just google it and you will see a lot of online conversion that are doing just that - converting via math. It all depends on the resolution, ofcourse - but the osx finder knows the resolution (the dpi) and the dimensions in pixels - it's just a matter of converting it to cm and display it. Osx can do math via spotligh, so why not in the info pannel - just let me choose what unit I like to view it in. For me it's cm, for someone in USA maybe in, let me choose it, or heck - display it in both, I woudn't mind.


I found some plugin on github, that does this with a right click. But I can't install it on my mac from work, and it's on the right click, not on the, oh so convenient, info panel in OSX.
 

Attachments

  • menu.png
    menu.png
    118.2 KB · Views: 54

iStorm

macrumors 68000
Sep 18, 2012
1,779
2,207
So, can you please explain to me, how can photoshop, or any other graphic program know how big my image is, in pixels, cm, in etc.?

I know the difference between pixels and cm, and that on my screen i get pixels. I work with this everyday!

The question remains: can the osx show me the dimensions in cm not pixels?
The article (and its video) BigBlur posted above explains it all. I highly suggest watching that as it explains it well...probably better than any of us can. Pay attention to the butterfly example he used. It's 10" in one Photoshop document, but is huge in another Photoshop document. He also goes through how an image doesn't have a physical size until it's printed and a DPI is specified. DPI (dots per inch) is not the same as PPI (pixels per inch).

I found some plugin on github, that does this with a right click. But I can't install it on my mac from work, and it's on the right click, not on the, oh so convenient, info panel in OSX.
Yes, this is showing what the image size would be if it were printed at 150dpi or 300dpi. Notice they are two different sizes. Are you able to customize it to show the specific DPI(s) you're interested in (ex. 600dpi or 1200dpi)? It seems to be this is somewhat like what you're looking for though.
 
Last edited:

Karlsruhe

macrumors member
Original poster
May 15, 2011
40
5
So, let me first say that I am no beginner in graphic production and/or photoshop. I know what it all means! BUT - the resolution it is show in finder, so osx knows the resolution - that it's ok for me and see at a glance what resolution the file is - but what more, or should I say different. The dpi it's not the problem or my question.

I really don't know why are you trying to explain to me the difference from dpi to pixels, this is not what I asked.

IF photoshop can show me the resolution in px or in or cm it can be done. Also the plugin from github can do it, then it's not a problem of dpi and how many pixels are there in an A4 (for example).

The question remains why OSX don't show me the dimensions I need, or can I make it via the command line or other way (plugin) to show me the image in cm.

@iStorm - yes the plugin is someway of what I want, but not exactly - I need it to be on the preview info, so that I can check swiftly if the many images that I exported from adobe - are the correct dimensions, not one by one right click, then right click again.. it takes a lot of time when you have a lot of files to check and tight deadlines. Also I can't install on work computer from github..

I attached some examples that show that I have 3 images with the same pixels 1000x1000 but different resolutions 72 dpi, 150 dpi, and 300 dpi. They are all 1000x100pixels but the difference in cm are visible in the bridge, because they have different resolutions - the pixels are the same.

Hope this clarifies a little what I want, and not a tutorial on dpi vs pixels (one that I know allready).
 

Attachments

  • Screenshot 2022-04-08 at 19.51.08.png
    Screenshot 2022-04-08 at 19.51.08.png
    203.3 KB · Views: 56
  • Screenshot 2022-04-08 at 19.51.04.png
    Screenshot 2022-04-08 at 19.51.04.png
    202.4 KB · Views: 60
  • Screenshot 2022-04-08 at 19.51.00.png
    Screenshot 2022-04-08 at 19.51.00.png
    203.8 KB · Views: 54
  • Screenshot 2022-04-08 at 19.58.47.png
    Screenshot 2022-04-08 at 19.58.47.png
    120.4 KB · Views: 56
  • Screenshot 2022-04-08 at 19.58.38.png
    Screenshot 2022-04-08 at 19.58.38.png
    118.3 KB · Views: 41
  • Screenshot 2022-04-08 at 19.58.55.png
    Screenshot 2022-04-08 at 19.58.55.png
    124.8 KB · Views: 53

dwig

macrumors 6502a
Jan 4, 2015
903
444
Key West FL
...The dpi it's not the problem or my question.

I really don't know why are you trying to explain to me the difference from dpi to pixels, this is not what I asked.

IF photoshop can show me the resolution in px or in or cm it can be done.
PPI is critical to this discussion.

The "size" of an image file is only its dimensions in pixels, NEVER EVER in inches or cm or ... , What you see in apps like Ps is the result of Ps doing some quick math. In the header of the file is a bunch of data specifying various stuff and nonsense. One bit of data is a PPI field (in many formats there are actually two, horizontal and vertical as seen in the example in the original post). When you ask Ps to display size in inches it is simply dividing the size in pixels by the PPI and displaying that number. That number doesn't exist in the header data, only the size in px and the PPI.

You can't change data in the file to alter the display seen in the original post. Any attempt to do so would damage the file. What the OP wants can only be accomplished by rewriting the app seen in the original post that is displaying the info so that it also did the math to show size in a desired set of units (e.g. if "inches" then 37.33" x 27.96").
 

Karlsruhe

macrumors member
Original poster
May 15, 2011
40
5
@dwig - Nor do I want to change any data in the file. I just want that the macOS, can do the math, or whatever the photoshop or other apps are doing, and show me the information in cm. The original post if also from macOS info.
 

dwig

macrumors 6502a
Jan 4, 2015
903
444
Key West FL
@dwig - Nor do I want to change any data in the file. I just want that the macOS, can do the math, or whatever the photoshop or other apps are doing, and show me the information in cm. The original post if also from macOS info.
I understand that, but your OP asked what you could change to accomplish this.

There is nothing that can be done other than to either replace the macOS app you use to view the data with a viewer that does the needed math or to pray to the Apple gods in the (vain) hope that they will change things.
 

Karlsruhe

macrumors member
Original poster
May 15, 2011
40
5
replace the macOS app you use to view the data with a viewer that does the needed math
I would do this, if I knew one better. Can anyone recommend? The finder replacements, like Path Finder - can they do this?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.