Howdy, Stranger!

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

Supported by

[solved] Unnecessary picture resize in sketchpad?

edited October 2013 in OpenSesame

Hi all,

in the experiment that I am currently building I present arrows that either point to the left or to the right. As stimuli, I use .png files on sketchpad items. Arrows are either located above or below a fixation cross. For some reason, some pixels that should be on the top of the arrows are not presented and the images get resized. All arrow types have a pixel size of 113x7. There is clearly enough room on the sketchpad, I do not understand why the arrow images get resized.

This is what I get in the debug: \right_congruent.png' was not a square power-of-two image. Linearly interpolating to be 128x128

Multiple images have needed resizing - I'll stop bothering you!

Does the image size of my arrows does not work in sketchpads? In another experiment I use 95x100 px images and they work just fine.
Edit: I just realized that OpenSesame also gives the error that images needed to be resized for the 95x100 px images.

Many thanks if someone can help!

Comments

  • edited 8:59PM

    Have you set the experiment resolution (on the 'General Overview') to match the screen you are using? I found that to be a problem in a recent experiment of mine when I switched to using a different screen.

    Best,

    Lee

  • edited 8:59PM

    PsychoPy's PatchStim and GratingStim classes convert images to rectangular patches of power-of-two dimensions. This is required for technical reasons. You generally don't notice this, but at the pixel level things may go slightly wrong. For example, very thin lines may disappear or become vague.

    If there is no specific reason to use the psycho back-end, you could try switching to the xpyriment back-end. Alternatively, you could present the image using PsychoPy's ImageStim class, in an inline_script item. The ImageStim class is somewhat newer and from what I understand it works slightly differently, so it may prevent the distortion from occurring.

    Hope this helps!

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • edited 8:59PM

    Hey Lee, thanks for your suggestions, but the resolution already matches the screen resolution, so that is not the reason.

    Sebastiaan, alas there is a reason why the xpyriment bachend does not work for me: I use Ascii asterisks as cues fin the eyperiment (like this ✱). These asterisks are displayed when I use the PsychoPy backend, but not when I use the xpyriment backend. If you know a way how to present asterisks in xpyriment, that would be very useful for me then (I guess as images they would work).

    Thanks already!

  • edited 8:59PM

    but the resolution already matches the screen resolution, so that is not the reason.

    ... I guess I'm the only one making goofy mistakes then! :D

    Hope it works out, back-end issues are beyond my knowledge...

    Lee

  • edited 8:59PM

    certainly not, the same thing happened to me at least once, but now the resolution is correct ;-)

  • edited 8:59PM

    I use Ascii asterisks as cues fin the eyperiment (like this ✱)

    Right, that's quite an exotic character you have there! This asterisk is actually not an ASCII character (this one is: *), which is why it is not shown by the xpyriment back-end: It's simply not part of the default font. If you can find out which font does include this character, you should be able to view it as well with the xpyriment back-end. So I would simply try a few different fonts until the character appears.

    You can quickly create a script that tries a lot of different fonts, like so:

    draw textline 0 0 "✱" font_family="Times New Roman"
    draw textline 100 0 "✱" font_family="Arial"
    draw textline 200 0 "✱" font_family="Courier New"
    # etc.
    

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • edited 8:59PM

    Hi Sebastiaan,

    I tried quite some fonts, but all resulted in an empty square instead of the asterisk. This seems odd to me, because the asterisk works in all fonts in the PsychoPy backend.

    I just created an image to display the asterisk, that works fine, thanks anyway!!

Sign In or Register to comment.