- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 101
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
png with transparency/alpha channel wouldn't shown #84
Comments
Can you upload the PNG file to GitHub? As far as I know, images with an alpha channel aren't supported right now because that would require support for "soft masks" in the PDF, which isn't implemented yet. Also see #61 |
I'm putting soft masks on my todo list, it's not that hard to implement (you need to split out the alpha channel and then reference it as a separate greyscale image). Can't say when I'll get back to working on printpdf though. |
for newcomer going here, this is the workaround #119 (comment) (work only with Rgba color space) |
Hi, I find SoftMask is ready, but how to use it? it has no constructor function. |
@BXHlixiaodong This is a stub API, it doesn't work yet |
@fschutt, I'm also interested in soft mask functionality and would be willing to help out if you'd like. If interested, could you point out some relevant parts of the code where you think it would make sense to plug it in and I'll see if I can help out? |
I went ahead and submitted a PR that adds support for rgba8 images. I think it may be helpful to more people so ideally we can merge it, but I am as of now unblocked via my fork. Here is the diff #158 |
Yeah, this is definitely fixed in |
printpdf version: 0.3.3
If I try to add a png with transparency, the image wouldn't shown. Other png files works fine.
The text was updated successfully, but these errors were encountered: