Displaying Images with Transparency
I am trying to create an experiment where two images are superimposed on top of each other and the participant needs to indicate which one they can see more clearly. Does OpenSesame have the capability to display two images on one sketchpad with 50% transparency and have both of them visible? This would save a lot of time creating every combination pre-superimposed.
Thanks for any help!
Comments
Hi @joelsolo99 ,
Yes, that's possible. If the transparency is already in the images (i.e. there's an alpha layer), than it's just a matter of showing the images on a
sketchpad.If you want to vary the transparency programmatically, then you can do that too, at least in Python (for the desktop). Let's say that you have an image file called
einstein.pngin the file pool. You can then set the transparency to 50% and save the resulting image aseinstein-with-transparency.pnglike so:Once you've done that, you can simply show
einstein-with-transparency.pngusing asketchpad. Do make sure that the image is created before thesketchpadis prepared!I'm not sure how to do this in JavaScript right now. It's probably possible, but will involve a bit of hacking.
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!