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

Improve encoding #18

Merged
merged 4 commits into from
Feb 11, 2021
Merged

Improve encoding #18

merged 4 commits into from
Feb 11, 2021

Conversation

mikowitz
Copy link
Owner

@mikowitz mikowitz commented Feb 11, 2021

Make improvements to image encoding:

  • Parallelize converting rows of pixels to binaries
  • Better calculation of necessary bit depth and color mode for optimized file size. In order, checks if the image can be encoded using:
    • grayscale, bit depth 1 ( black and white)
    • grayscale/alpha, bit depth 8
    • indexed, bit depth 1,2,4,8 depending on how many colors in the palette
    • truecolor/alpha, bit depth 8
  • Allow encoding options to be passed to ExPng.Image.to_file/3
    • right now it only allows compression level

Adresses #11

@mikowitz mikowitz linked an issue Feb 11, 2021 that may be closed by this pull request
@mikowitz mikowitz merged commit b5c65d4 into main Feb 11, 2021
@mikowitz mikowitz deleted the improve-encoding branch February 11, 2021 17:26
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.

1 participant