Skip to content

Conversation

@Mohammadwasifbalti
Copy link

Fixed the issue #1638

Before:
image

Result:
image

@blikblum
Copy link
Member

blikblum commented Aug 1, 2025

Great work

Please add a changelog entry

@blikblum
Copy link
Member

blikblum commented Aug 1, 2025

Can you upload the png that triggers the error?

@Mohammadwasifbalti
Copy link
Author

Hi
I've already updated the changelog.md entry.
The PNG was uploaded but below is the link of that png:
https://clienwh.osapps.ae/assets/images/qrcodes/NT25073071831420.png

@Mohammadwasifbalti
Copy link
Author

I've pushed the final code for this pull request

@blikblum
Copy link
Member

blikblum commented Aug 1, 2025

Can you look at failed tests?

removed the smask for one test case and test the output of that particular image is perfect
@Mohammadwasifbalti
Copy link
Author

Tests are passed

@blikblum
Copy link
Member

I added the following code to kitchen sink example:

doc.image('../tests/images/pngsuite-palette-transparent-white.png', 100, 200)

After this PR the image looses its transparency

We should look for a fix that do not add regressions

@blikblum
Copy link
Member

blikblum commented Nov 1, 2025

I added the offending png to repository so we can properly test.

I'm closing since the fix is not correct although is hinting where the problem lies (the current code works by accident since alphaChannel is always truthy)

@blikblum blikblum closed this Nov 1, 2025
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