Screenshot ( exportimage message ) not working specifically after using jit.fx.co.dodge
hi!
I'm using a screenshot piece of code based on what's suggested here ( https://cycling74.com/forums/save-screenshot-of-a-video-with-bang )
Everything is working properly, but only when I'm using a jit.fx.co.dodge fx the screenshot is not working ( is outputing a blank image )
My patch is bigger, but I created this patch example in which you can see the problem:
Also, You'll see there's a subpatcher in which I encapsulated what was suggested on the beforementioned forum post, but making sure it's receiving a texture ( which converts to matrix using texture2matrix ).
All help pointing me in those directions is welcome:
- how to solve the dodge thing, so I can still use dodge and do screenshots
- how to improve my subpatcher for screenshotinng
Thank you,
I'm not sure how dodge fx works, but it appears to set the entire alpha channel to 0 (complete transparency), which in result seems to prevent the color from being retained and it gets saved to fully white, fully transparent.
You can fix that by making sure your alpha channel is set to 1 before export:

And about improving your screenshot subpatcher, I'm not sure what the VIZZIE module brings you here since the interface is burried inside subpatchers, and you can achieve the same result with basically just a [jit.gl.texture] to set the desired export dim, and a [jit.gl.asyncread] for readback to matrix before export. I also added some triggers to make sure the order of operations is right. [jit.gl.asyncread] is by definition asynchronous, so it might output the matrix to export after the [jit.matrix] have received the exportimage
message. I used a few [t] and a [zl.reg] to make sure the exportimage
reaches the [jit.matrix] only after the matrix has been updated.
I updated my patch with your suggestions and it's working ;)
Thank you so much for your suggestions!