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

Optimize PNG and JPEG Images #43

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

FazlyMR
Copy link

@FazlyMR FazlyMR commented Aug 19, 2023

This is related to issue #36, but with some differences:

  • This also optimizes JPEG image(s), including one PNG image that was a JPEG image, which is reconverted to JPEG.
  • PNG images with transparent background are filled with the same color used in the website since indexed color does not properly support alpha channel (as far as I know).
  • PNG images have their Total Unique Colors (TUCs) reduced to a number following this calculation: ((TUC/8)+(TUC/9))/2 instead of the reduction factor said in the aforementioned issue.

With this optimization, the file size of the entire library of images from chapters 0 to 7 are reduced from ~3MBs to ~700KBs.

Originals are included inside the new "originals" directory.

@vercel
Copy link

vercel bot commented Aug 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
putting-the-you-in-cpu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2023 8:13am

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.

None yet

1 participant