Skip to content

feat: render .pxd thumbnails.#1430

Open
Sola-ris wants to merge 3 commits into
TagStudioDev:mainfrom
Sola-ris:feat/pxd-thumbs
Open

feat: render .pxd thumbnails.#1430
Sola-ris wants to merge 3 commits 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.

Comment thread src/tagstudio/qt/previews/renderer.py Outdated
Comment thread src/tagstudio/qt/previews/renderer.py
@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
@Sola-ris

Sola-ris commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

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.

Got it, I just put it there since Apple lists it alongside Pages and friends on the Pixelmator
Website.

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()

Makes sense, I'll go with _apple_embedded_thumb() for now.

For now I'd also just keep the .pxd extension in the _DOCUMENT_SET

Wouldn't that look something like this, grouping wise?

elif (MediaCategories.is_ext_in_category(ext, MediaCategories.IWORK_TYPES)
      or MediaCategories.is_ext_in_category(ext, MediaCategories.DOCUMENT_TYPES)):
    image = self._apple_embedded_thumb(_filepath)

It doesn't seem right, to treat all documents as potential apple formats.
I could add a MediaType for Apple Creative Studio and use it like this

elif (MediaCategories.is_ext_in_category(ext, MediaCategories.IWORK_TYPES)
      or MediaCategories.is_ext_in_category(ext, MediaCategories.APPLE_CREATIVE_STUDIO)):
    image = self._apple_embedded_thumb(_filepath)

@CyanVoxel

Copy link
Copy Markdown
Member

For the check here you could either just use a check against the extension itself, similar to the PowerPoint one:

elif MediaCategories.is_ext_in_category(ext, MediaCategories.IWORK_TYPES) or ext == ".pdx":
    image = self._apple_embedded_thumb(_filepath)

Since there's a growing dissonance between the media categories and what they're used for (e.g. searching for documents vs rendering document thumbnails) this'll be just fine for now. Eventually I'll rework the media types to better separate the groups depending on what they're used for

@CyanVoxel CyanVoxel moved this from 🚧 In progress to 👀 In review in TagStudio Development 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 review

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Thumbnail support for .pxd Documents

2 participants