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 scaling of 1bit grayscale pixels in renderDeviceGrayToPNG #411

Closed
wants to merge 4 commits into from

Conversation

ungerik
Copy link
Contributor

@ungerik ungerik commented Dec 20, 2021

In renderDeviceGrayToPNG color.Gray.Y is expected to be in the range of 0 .. 255, but the default was colValRange{0, 1}.

I have also removed the unnecessary allocation of a []colValRange slice per pixel which should improve performance.

@hhrutter hhrutter closed this in b8b77ee Jan 15, 2022
@hhrutter
Copy link
Collaborator

There are 2 separate steps involved here:

  1. Decoding the pixel value into the source color space respecting the optional DecodeArray
  2. Scaling up to 8 bpc

Thank you for your contribution!

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

2 participants