Skip to content

feat: render .pxd thumbnails.#1430

Open
Sola-ris wants to merge 1 commit into
TagStudioDev:mainfrom
Sola-ris:feat/pxd-thumbs
Open

feat: render .pxd thumbnails.#1430
Sola-ris wants to merge 1 commit into
TagStudioDev:mainfrom
Sola-ris:feat/pxd-thumbs

Conversation

@Sola-ris

@Sola-ris Sola-ris commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for rendering .pxd thumbnails.
Fixes #1409.

As mentioned in the issue, .pxd files store their thumbnails in the QuickLook folder, similar to the other iWork files, they just use .heic images instead of .jpg.
Preview.heic is checked before Thumbnail.heic since its resolution is a bit higher (2000x2000 instead of 1024x1024).

Before

before

After

after

File used for testing

sample.pxd.txt from #1409.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@CyanVoxel CyanVoxel added Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed TagStudio: Thumbs/Previews File thumbnails or previews labels Jul 6, 2026

@CyanVoxel CyanVoxel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Functionally everything appears to work, though I have a couple nits for the documentation and a big nit for the categorization: Pixelmator is not a part of the iWork suite. iWork has always consisted only of Pages, Keynote, and Numbers. Pixelmator Pro has recently become a part of the Apple Creative Studio, which includes iWork apps along side their other professional grade software and miscellaneous apps like Freeform, but that does not retroactively make any of these part of the iWork suite.

I understand that the code for extracting an embedded thumbnail from a typical iWork file as well as a .pxd file is incredibly similar and seems to share many of the possible internal filenames, so I'd recommend renaming this class to something more generic like _apple_creative_suite_thumb() or _apple_embedded_thumb(). I know that typical iLife files don't have compatible structures with this, and can't speak for how the rest of the files in the creative suite operate, so it may be best to play it as generic as possible. For now I'd also just keep the .pxd extension in the _DOCUMENT_SET, I need to give these sets some attention and do an overall cleanup and reorganization.

scale_factor = 2.5
page_size *= scale_factor
# Render image with no anti-aliasing for speed
# Render image with no antialiasing for speed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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


@staticmethod
def _iwork_thumb(filepath: Path) -> Image.Image | None:
"""Extract and render a thumbnail for an Apple iWork (Pages, Numbers, Keynote) file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Extract" is correct here since it's pulling an existing image from an archive, while changing it to simply "Render" is misleading as that gives the impression that the file is being processed and rendered for an image, similar to how the native applications in question would render them, which this is not doing

@CyanVoxel CyanVoxel moved this to 🚧 In progress in TagStudio Development Jul 6, 2026
@CyanVoxel CyanVoxel added this to the Alpha v9.6.2 milestone Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed TagStudio: Thumbs/Previews File thumbnails or previews Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience

Projects

Status: 🚧 In progress

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Thumbnail support for .pxd Documents

2 participants