fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
777 stars 95 forks source link

Adding support for rgba8 images #158

Closed mikeparisstuff closed 5 months ago

mikeparisstuff commented 8 months 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 8 months ago

Otherwise LGTM am on mobile rn, will review later

AxelNilsson commented 7 months ago

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

huand commented 5 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!