Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] is it possible to fade in a image, like really slowly?

edited December 2014 in OpenSesame

i am trying to show some images in my experiment by fading them in, so you cant recognize the subject from the beginning but during about 4 seconds the image should be shown clearly.
does anybody know how to do this?
thanks again!

Comments

  • edited December 2014

    Hi MasterThesis,

    I know a trick, but it's not really an elegant one as it only works in the psychopy backend, and therefore you can't use the legacy or expyriment backend anymore after you implemented it like this. Nevertheless, here is how you can easily change the opacity of stimuli using a bit of psychopy code in your inline_script items:

    #  Create a canvas and draw a circle on it
    canvas = self.offline_canvas()
    canvas.circle(100, 100, 50, fill=True, color='red')
    
    # Get a reference to this circle
    # It is the last drawn item in psychopy stim_list
    circle_stim = canvas.stim_list[-1]
    # Set the circle_stim opacity to 50%
    circle_stim.opacity = 0.5
    
    ## Preferably put the code below in the run phase
    
    # Show the canvas
    canvas.show()
    # Sleep for 5 seconds to keep the circle onscreen that long
    self.sleep(5000)
    

    I've been planning to implement this opacity parameter in the normal canvas functions of Opensesame (so it works with all backends and you don't need to work with backend specific code like I'm doing in this example), but haven't found the time for it yet. In the future it should be easier to change opacity of stimuli directly with OpenSesame canvas statements.

    Buy Me A Coffee

  • edited 10:10AM

    hi, thanks, but i guess i forgot something, because all i got is an red circle on a canvas now. but i wanted to have my used images to fade in slowly, not the red circle :) how do i do that?

  • edited December 2014

    You do it just the way, which Daniel described.
    Note the line:

    circle_stim = canvas.stim_list[-1]
    

    assigns the last drawn element to the variable circle_stim. So just make sure to draw your image last and you will have the same effect for it as you have right now for the circle. Check the documentation to learn how to draw images.

    Good luck,

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games