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

Fix: export jpg format error(v8) #10316

Merged
merged 4 commits into from
Mar 21, 2024
Merged

Fix: export jpg format error(v8) #10316

merged 4 commits into from
Mar 21, 2024

Conversation

yungzhu
Copy link
Contributor

@yungzhu yungzhu commented Mar 13, 2024

format is 'image/png' or 'image/jpeg'
add a map

Copy link

codesandbox-ci bot commented Mar 13, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a2b9e99:

Sandbox Source
pixi.js-sandbox Configuration

@Zyie Zyie requested a review from bigtimebuddy March 13, 2024 11:29
@Zyie Zyie changed the title fix: fix export jpg format error(v8) Fix: fix export jpg format error(v8) Mar 13, 2024
@Zyie Zyie changed the title Fix: fix export jpg format error(v8) Fix: export jpg format error(v8) Mar 13, 2024
const imageTypes: Record<Formats, string> = {
png: 'image/png',
jpg: 'image/jpeg',
// webp: 'image/webp',
Copy link
Member

Choose a reason for hiding this comment

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

Can we enable webp? Was there a reason you disabled?

Also, the Formats type can be simplified to be typeof keyof imageTypes to be less redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

type Formats = 'png' | 'jpg';
Because the current definition is two, we can add more if needed

Copy link
Member

Choose a reason for hiding this comment

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

Go ahead and just add webp. It is supported with the browser API

Copy link
Contributor Author

@yungzhu yungzhu Mar 14, 2024

Choose a reason for hiding this comment

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

done

Copy link
Member

@bigtimebuddy bigtimebuddy left a comment

Choose a reason for hiding this comment

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

Nice! Thank you.

@Zyie Zyie added v8 ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t labels Mar 18, 2024
@Zyie Zyie added this pull request to the merge queue Mar 21, 2024
Merged via the queue into pixijs:dev with commit e61137e Mar 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t v8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants