imazen / imageflow-dotnet

The official .NET API for Imageflow, the Rust image processing and optimization engine for web servers
GNU Affero General Public License v3.0
143 stars 25 forks source link

[Question] Composing multiple images #27

Closed jakenuts closed 3 years ago

jakenuts commented 3 years ago

Is overlaying multiple images possible, and if so what would be the recommended way of achieving that? I gave multiple watermark calls a try and it did overlay them but the intermediate overlay lost it's transparency. I know this is a bit far afield for the library so "not today buddy" is a good answer.

Thanks!

lilith commented 3 years ago

Multiple overlays should work fine - perhaps we need more integration tests. Can you share your code/json and source images?

On Tue, Mar 16, 2021, 6:36 PM James White @.***> wrote:

Is overlaying multiple images possible, and if so what would be the recommended way of achieving that? I gave multiple watermark calls a try and it did overlay them but the intermediate overlay lost it's transparency. I know this is a bit far afield for the library so "not today buddy" is a good answer.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow-dotnet/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH2II4WO6J3AI6SDVADTD72PZANCNFSM4ZJSO57Q .

jakenuts commented 3 years ago

Here is an app that demonstrates what I was seeing. It loads a "canvas" and then overlays three transparent color-grid pngs and saves the result to another png file. If the canvas is jpg, the watermarks all retain their transparency. If the canvas is a png, the first watermark is drawn without transparency. After running you can see the different outputs in the images folder.

https://github.com/jakenuts/SharedCode/tree/main/ComposeImages

overlaid-on-jpg overlaid-on-png

Thanks!

James

lilith commented 3 years ago

This has been fixed in 0.7.22. You can switch to the Imageflow.AllPlatforms package or replace your Imageflow.NativeRuntime.* dependencies.

jakenuts commented 3 years ago

Will do! Thanks so much!