Skip to content

Show image dimensions in preview#1357

Open
MoonMao42 wants to merge 3 commits intop0deje:masterfrom
MoonMao42:show-image-dimensions-in-preview
Open

Show image dimensions in preview#1357
MoonMao42 wants to merge 3 commits intop0deje:masterfrom
MoonMao42:show-image-dimensions-in-preview

Conversation

@MoonMao42
Copy link
Copy Markdown

Fixes #1139.

Displays pixel dimensions (e.g. "500×300") in the preview panel when hovering over an image clipboard entry. The dimensions line only appears for image items.

Changes:

  • Added a "Dimensions" row to PreviewItemView that reads the image size from the clipboard data
  • Added the "Dimensions" localization key to all .lproj/PreviewItemView.strings files (non-English files use English as placeholder for Weblate to translate)

Copy link
Copy Markdown
Collaborator

@weisJ weisJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Though can you put the image dimension above the general info. This move the size closer to the image and avoid jumping text between different types of copies.

NSImage.size returns points, not pixels. On Retina displays, this shows
scaled-down dimensions. Use NSBitmapImageRep.pixelsWide/pixelsHigh to
get the real image resolution, with fallback to size when no bitmap
representation is available.
@MoonMao42 MoonMao42 force-pushed the show-image-dimensions-in-preview branch from cb021d8 to 897fb08 Compare April 21, 2026 14:41
@MoonMao42
Copy link
Copy Markdown
Author

Moved it above the general info. Now the lower rows don't shift when you switch between image and text items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show dimensions of image

2 participants