Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata: add support for JPG thumbnails #679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

meteyou
Copy link
Contributor

@meteyou meteyou commented Jul 2, 2023

This PR adds support for JPG thumbnails. I tested it with PrusaSlicer 2.6.0:

image

@pedrolamas
Copy link
Contributor

Oh, why did they do this... 🤦‍♂️

@meteyou
Copy link
Contributor Author

meteyou commented Aug 10, 2023

sry... i don't know why... i also cannot find a solution/setting zu change the background color of image. so its just black.

@pedrolamas
Copy link
Contributor

JPG doesn't have alpha channel, so no surprise the background is black, but I guess we are still missing the QOI image format?

@meteyou
Copy link
Contributor Author

meteyou commented Aug 11, 2023

Yeah. I just search for a default background colour PS, but I don't found anything...

Comment on lines 222 to 223
r"; (thumbnail|thumbnail_JPG)? begin([;/\+=\w\s]+?)"
r"; (?:thumbnail|thumbnail_JPG)? end", data)
Copy link
Contributor

@pedrolamas pedrolamas Aug 11, 2023

Choose a reason for hiding this comment

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

I think you want both in non-capture mode and not-optional:

Suggested change
r"; (thumbnail|thumbnail_JPG)? begin([;/\+=\w\s]+?)"
r"; (?:thumbnail|thumbnail_JPG)? end", data)
r"; (?:thumbnail|thumbnail_JPG) begin([;/\+=\w\s]+?)"
r"; (?:thumbnail|thumbnail_JPG) end", data)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx! I did a force push with the fix. I think arksine merged the commits directly.

Thx to pedrolamas for the regex fix

Signed-off-by: Stefan Dej <[email protected]>
@meteyou meteyou force-pushed the feat/add-jpg-thumbnail-support branch from 6979abb to f354f42 Compare August 11, 2023 18:13
@pedrolamas
Copy link
Contributor

FWIW, my PR to add QOI and JPG thumbnails support to Windows PowerToys has been merged and will be available on the next release!

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.

2 participants