Uploading image

1,519 views
Skip to first unread message

gilis

unread,
Feb 22, 2010, 2:39:11 AM2/22/10
to E-Prime
Hi,
I'm pretty "green" with Eprime and started to program with only
recently. Anyway, I now have to program an experiment in which
participants will have to make achoice and to indicate it in regard to
the side of the image in which the stimuli have appeared. The stimuli
is realy large one and so when I try to upload it to a slide object I
always get the image presented truncated to different extents at the
edegs of the screen. I tried to play with the size of the image in the
slide object but I failed to get satisfaying results.

So now my focus is on how the image can be uploaded through Canvas
object but yet the knowledge I have in programing with Eprime turn it
to a real sisyphean task and I don't even always what my mistakes were
or way it didn't work, or if Canavas object is the only or the best
solution.

So, I would be very grateful to any one who could help me with this in
any way.

Regards
Gili

liwenna

unread,
Feb 22, 2010, 4:13:16 AM2/22/10
to E-Prime
Hey Gilis,

The imageobject in the slideobject should be able to display your
image reliably in the way you wish it to be displayed... I don't think
the canvas object will solve your problem. But, as with everything in
research, make sure you've controlled all the necessary variables. I
am not too sure about what's going on but it seems to me that your
image is larger than either your display is, OR larger than the
displaysize e-prime uses....

Under start menu, settings, control panel; display settings, find the
current size of your display in pixels.... I use a 1280*1024 pixels
display for instance.

Next: you mention your image is very big.... is it's actual size (in
pixels) bigger than your display is??? (in my case that would be over
1280 or 1024 pixels on either dimension). Open the picture in viewer
and choose 'actual size' to see if it actually fits into your
screen... If not... use photoshop or gimp to resize it. You simply
should not use an imagesize that your display can't show ...

Third (and I actually think that this is where your problem lies):
when e-prime runs an experiment it resets the display settings to it's
own 'settings'. By default e-prime reconfigures the display to 640*480
pixels. This means that if your image is bigger than that.. it won't
fit on the screen. It also means that pretty much everything in your
experiment will look rather 'chunky'. Go to the properties of the
experiment object (e-prime logo at the top of your experiment tree),
choose devices; choose display and set the display size to the actual
size of your display.

I guess you'd better reset all the properties of the imageobject in
your slide (size 100% you can resize later, or even better: set it at
the actual pixel dimensions your image has) and set the x and y
coordinates to center and have a look at how e-prime displays your
image now.

I hope it will be fixed this way!

Best of luck,

liw

gilis

unread,
Feb 22, 2010, 6:04:43 AM2/22/10
to E-Prime
Hi Liw,
thanks for your detailed reply-I will try your solutions, in the
meanwhile just wanted to add that
the size of the Image is smaller than the size of the display
(although I still have to see if it's true in pixels as well)..
Best Wishes
GiliS

Michiel Spape

unread,
Feb 22, 2010, 6:27:35 AM2/22/10
to e-p...@googlegroups.com
Hi,
Just to add to this excellent set of solutions by liw, *yes*, it is possible to use Canvas to load your image to the screen directly! Have a look at Canvas.LoadImage (eBasic help). This will also help you, if you want to do some later canvas work, in understanding offscreencanvas buffering and such, so it's not entirely useless.

That said, it is not enormously useful, unless you have some reason to use canvas in the first place (e.g. you need to draw all kinds of things to the screen ad hoc), as A: it's an awful lot of script, and B: you can't do more than with slides or even imageObjects. Certainly, E-Prime does not magically make your image of size 800 x 600 fit on a screen that is set in 640 x 480 without cropping the image (which seems exactly what you want?). I would like to stress the fact that cropping in E-Prime works sub-optimally (aliasing problems tend to cause nasty pixel artefacts) in any way and since any decent experimenter wants perfect stimulus material, I'm sure you want to avoid this.

Cheers,
Mich

Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology

Hey Gilis,

Best of luck,

liw

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

gilis

unread,
Feb 22, 2010, 7:11:54 AM2/22/10
to E-Prime
Hi Liwenna,
Just wanted to thank you again-you are great! your advices saved me a
lot of work in the very wrong directions...
Warm regards
Gilis

On 22 פברואר, 11:13, liwenna <liwe...@gmail.com> wrote:

Michiel Spape

unread,
Feb 22, 2010, 7:11:09 AM2/22/10
to e-p...@googlegroups.com
Just to add a little bit more to my previous mail:
When you say: 'although I still have to see if it's true in pixels as well', it seems you fail to see what exactly digital images are. Images, in particular bitmap images, do not have a size *other than pixel-size*. As such, an image of 100 x 100 pixels will inevitably take up 100/1024 x 100/768 space on your monitor, should your monitor be set to 1024 x 768, unless you stretch the image over a different number of pixels (which usually leads to quality degrading results).
Best,
Mich

Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology


-----Original Message-----
From: e-p...@googlegroups.com [mailto:e-p...@googlegroups.com] On Behalf Of gilis
Sent: 22 February 2010 11:05
To: E-Prime
Subject: Re: Uploading image

gilis

unread,
Feb 22, 2010, 7:23:21 AM2/22/10
to E-Prime
Thank you Michiel as well,
I stand corrected. I know how silly it sounded, but usually there is
some correlation between the image physical diamensions, size on disk
and its pixel -size.
Thanks alot for your advices in regard to the use in in canvs.
Gilis

On 22 פברואר, 14:11, Michiel Spape <Michiel.Sp...@nottingham.ac.uk>
wrote:

> For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en.

David McFarlane

unread,
Feb 22, 2010, 8:52:25 AM2/22/10
to e-p...@googlegroups.com
Gili,

Hmm, I don't think anyone mentioned the Stretch property of Image
objects. Setting Stretch to "Yes" will stretch or shrink images of any
pixel dimensions to exactly fit the Image frame in E-Prime (I use this
feature myself to animate some displays). But you should still pay
attention to what others have said about first trying to get the
dimensions of your images to better match your screen dimensions.

-- David McFarlane, Professional Faultfinder

Reply all
Reply to author
Forward
0 new messages