fschutt / printpdf

A fully-featured PDF library for Rust, WASM-ready
https://fschutt.github.io/printpdf/
MIT License
829 stars 98 forks source link

Adding support for rgba8 images #158

Closed mikeparisstuff closed 10 months ago

mikeparisstuff commented 1 year ago

I'm new to this project and PDF internals in general but I was able to get RGBA8 images working. I've added an example that demonstrates the behavior with a transparent png of a cute pup. Let me know if you would like to see any changes but I think a number of people would benefit from this :)

fschutt commented 1 year ago

Otherwise LGTM am on mobile rn, will review later

AxelNilsson commented 1 year ago

Great PR! However, this only works for square images, will see if I can do a fix.

huand commented 9 months ago

pinging @mikeparisstuff there are maybe issues that you might have better understanding? https://github.com/fschutt/printpdf/issues/166

thanks if you have time to take a look!