How to see image dimensions and file size on a Mac
You can do this with B64 in the Inspector, for a file you loaded or a payload you decoded. Here is everything it shows.
Half the questions that come up mid-conversion are about the file rather than the conversion. How big is it? What resolution? Is it really a PNG? Is this the high-resolution version or the thumbnail?
The Inspector answers all of those beside the work rather than in another window.
Open it
Press ⌥⌘I, or click the info button in the toolbar. It stays open as you move between workspaces, showing details for whatever is in front of you.
What it shows
| Field | In Encode | In Decode |
|---|---|---|
| Name | The source file's name | — |
| Kind | JPEG image, PNG image, PDF document… | The detected kind |
| MIME | image/jpeg, application/pdf… | Declared and actual |
| Size | The source file on disk | The size of the decoded bytes |
| Pixels | Width × height | Width × height |
| Characters | The length of the result | The length of the input |
| Overhead | How much larger the Base64 is | — |
| SHA-256 | Of the source file | Of the decoded bytes |
Every value is selectable, so any of them can be copied into a ticket, a spec or a message.
The dimensions line is the one to read first
A preview fitted to a pane looks the same at 640 pixels wide and at 3 729. The dimensions tell you which you have, which settles a surprising number of questions:
- Is this the retina asset or the 1× one? Compare against the size it is displayed at.
- Is this payload the full photograph or a thumbnail? A 150 × 150 payload is a thumbnail whatever it was labelled.
- Why is this template so heavy? An embedded logo at 2 000 pixels shown at 120 is weight in every copy of the message.
When you extract images from a template or a stylesheet, glance at the dimensions of each one as it decodes. Oversized embedded assets are extremely common and are invisible until somebody looks.
Kind and MIME
Both are read from the bytes rather than from the file name. A file called logo.png that is really a JPEG is reported as a JPEG here — which is how you find out before it causes a problem somewhere that cares. In Decode you also get the declared type from a data URI alongside the actual one. See how to check the real format of a Base64 image.
Size and overhead
In Encode you get both ends: the source file's size, and the character count and percentage overhead of the result. That is the number to check before pasting a payload into anything with a field limit. See how to see how much bigger Base64 makes a file.
Troubleshooting
Some fields are empty
They apply to the other direction, or the value is not available yet — the SHA-256 computes on request rather than automatically.
The dimensions are blank
The file has no pixel dimensions. A PDF is measured in pages and points rather than pixels.
The kind is not what the file is called
That is the Inspector being useful. The bytes are the file; the extension is a label somebody applied.
Frequently asked questions
Where do I see an image's dimensions?
In the Inspector, under Pixels — press Option Command I. It shows the dimensions of a loaded source in Encode and of a decoded payload in Decode.
Is the MIME type read from the file extension?
No, from the bytes. A file named .png that is really a JPEG is reported as a JPEG.
Can I copy the values?
Yes, all of them. Every field in the Inspector is selectable text.
Why are the dimensions blank for my PDF?
A PDF has pages and points rather than pixel dimensions, so there is nothing to show in that field.