trying to manipulate an image within opensesame and display it
Hi, I have an inline code which manipulates a jpeg and saves it , the code is below and it works
import os from PIL import ImageEnhance from PIL import Image,ImageFilter ruta= "/Users/dsb/Nextcloud/pythonR/image-processing" im = Image.open(os.path.join(ruta) + '/numbers.jpeg') enh = ImageEnhance.Contrast(im) pepe = enh.enhance(0.2) pepe.save(os.path.join(ruta) + '/imagenumbers.jpeg') var.pepeim = str(os.path.join(ruta) + '/imagenumbers.jpeg') print (pepeim)
then subsequently I try to load the saved image using the sketchpad, and the script section I have
set duration keypress set description "Displays stimuli" draw image center=1 file="[pepeim]" scale=1 show_if=always x=0 y=0 z_index=0
however I can not make it work, OS does not recognise the file, I have tried with [pepeim] but it does not see it
any advise will be appreciated!