AsyncGraphics icon indicating copy to clipboard operation
AsyncGraphics copied to clipboard

`levels` effect not consistent between video & camera source

Open nkleemann opened this issue 11 months ago • 3 comments

When processing frames from Graphic.playVideo with the levels effect, and setting the gamma uniform in the levels shader to values greater than 1, the image does not get inverted. But when you obtain frames from the camera, the image does get inverted.

This is just a small issue, but swapping between video/camera sources might be common during development to prototype effects. So it might be worth looking into parity between the two frame sources.

Example:

let processed = try await frame.levels(
            brightness: 2,
            darkness: 0.6,
            contrast: 0.2,
            gamma: 1.2 
        )

nkleemann avatar Mar 17 '24 11:03 nkleemann

Interesting, I'll try to look into this, thanks!

heestand-xyz avatar Mar 27 '24 08:03 heestand-xyz

I think it has to do with high bit graphics, you can force it to 8bit here: https://heestand-xyz.github.io/AsyncGraphics-Docs/documentation/asyncgraphics/graphic/bits(_:)

heestand-xyz avatar Apr 05 '24 05:04 heestand-xyz

Will try it out, thanks!

nkleemann avatar Apr 06 '24 09:04 nkleemann