Canvas questions to load images

Corona shunyata.aishwarya at gmail.com
Mon Sep 17 17:13:09 UTC 2012


Hi,

Thank you all for your help so far. I have been reading a few posts on 
resolving image dimension issues. Here is what I have done so far:

1) My system resolution is 1280 x 800

2) I went to e-prime->experiment->devices->display->edit->and changed to 
1280 x 768 (I do not have 800 as a drop down option).

3) My images have uniform pixel dimensions of 424 x 283 (bmp images). 

4) I am using canvas object given the large number of images I have: 

After loading the offscreen canvas, my script (based on a previous response 
to my question) is as shown below:

xMargin = 120
yMargin = 120

myRect.Left = xMargin 
myRect.Right = xMargin + 424
myRect.Top = yMargin 
myRect.Bottom = ymargin + 283 

However, this caused my images to be cropped. I played around with the 
numbers for xMargin, but did not get any satisfactory results (images are 
cropped on either length or width). 

Then, I resorted to trying this:

XRes = 1280
YRes = 768

'define source rect as full screen
src.Left = 120
src.Top = 120
src.Right = Display.XRes
src.Bottom = Display.YRes

'define destination rect as top left quadrant
dest.Left = 120
dest.Top = 120
dest.Right = 120 + Display.XRes + 424
dest.Bottom = 120 + Display.YRes + 283

This yielded better results, but my images are still cropped. What am I 
missing here? I changed screen dimensions on e-prime to 
approximately"match" my system's resolution, but still not getting the 
results I desire. 

Thank you again for your input,
Corona

On Sunday, September 16, 2012 2:18:01 PM UTC-4, Corona wrote:
>
> Thank you. I had looked at the site link you've given, but it was more a 
> problem of running the validation tool that was failing (although I do have 
> an original Vista version). Apparently, the error I encountered is quite 
> common (or so, the Microsoft user forums suggest). I however, found a 
> roundabout way, which may be useful for others:  
> http://download.cnet.com/Help-Explorer-Viewer/3000-6675_4-10666661.html . 
> This software application works as a reader for .hlp files.
>
> Thank you for your suggestions. Now that I have the E-Basic help showing 
> up(or visible), I can at least look it up.
>
> Corona.
>
> On Sunday, September 16, 2012 1:43:51 PM UTC-4, J wrote:
>>
>>  This should help with viewing help files in Windows Vista (as a novice 
>> e-basic programmer, I have to say that access to E-Basic Help is essential).
>>
>> http://support.microsoft.com/kb/917607
>>
>> J
>>
>> On 9/16/2012 11:36 AM, Corona wrote:
>>  
>> Thank you. I do not have access to the e-prime basic help, due to running 
>> a Windows-Vista, 64-bit system.  .hlp files are no longer recognized by 
>> Vista-32. I tried installing a tool that allows .hlp files to be read, but 
>> it somehow failing. Is there a workaround to this, so I can view the 
>> e-prime basic files? 
>>
>>  Thanks,
>> Corona
>>
>> On Sunday, September 16, 2012 11:39:37 AM UTC-4, Peter Quain wrote: 
>>>
>>>  
>>> I cannot think of why might else you would crave this knowledge. The 
>>> documention, topic Canvas, will help understanding this code, you will need 
>>> to if it is Canvas that you wish to use
>>>
>>> At 01:31 AM 17/09/2012, you wrote:
>>>
>>> Thank you Alphonse, for the quick reply. More for the purpose of 
>>> understanding the code, than anything else, why do you repeat  cnvs.Copy 
>>> offScreenCnvs, myRect, myrect (with myrect twice)? More specifically, how 
>>> is this understood by e-prime? Also, I am guessing I do not have to include 
>>> a slideobject?
>>>
>>>
>>>
>>> On Sunday, September 16, 2012 10:59:26 AM UTC-4, alphonse wrote:
>>>  
>>> -----------------------------------------------
>>>  'Prepare stimulus offscreen
>>>  offScreenCnvs.LoadImage stim
>>>
>>>  'Define the copy area
>>>  Dim myRect As Rect
>>>  myRect.Left = xMargin
>>>  myRect.Right = xMargin + 60
>>>  myRect.Top = yMargin
>>>  myRect.Bottom = yMargin + 60
>>>
>>>  'Copy prepared stimulus to screen
>>>  cnvs.Copy offScreenCnvs, myRect, myRect
>>>  
>>> --------------------------------------------------------------------------
>>>
>>>  At 12:39 AM 17/09/2012, you wrote:
>>>
>>> I am currently running a dot probe task with visual paired stimuli 
>>> (positive, negative). I have a two fold question pertaining to this task:
>>>
>>>  1) I have about 60 images in one of my trialprocs, and was therefore 
>>> advised to use the canvas option to preload images. I have had little 
>>> success with using this object, particularly because I do not entirely 
>>> understand the concepts of off-screen and on-screen canvas. I have managed 
>>> to write a small script with help from the references guides posted on the 
>>> e-prime website (as well as forums), but am stuck when it comes to the 
>>> following statement:
>>>
>>>  1.      When preparing the trial:
>>>
>>>   
>>>
>>>  targetCanvas.LoadImage stim 
>>>
>>>   
>>>
>>>  Image is loaded to the top left corner. We need to define 2 Rect 
>>> Objects: StimLoadRect and StimRect (see Rect object in the E-Basic Help), 
>>> both the size of the images to-be-loaded, but the StimRect at the 
>>> (Left,Right, Top,Bottom) coordinates where the stimulus will be displayed. 
>>> When we copy the image from the offline canvas to the online canvas, we 
>>> will copy from StimLoadRect to StimRect.
>>>
>>>   
>>>
>>>  2.      To run the stimulus:
>>>
>>>   
>>>
>>>  Display.WaitForVerticalBlank
>>>
>>>  c.setAttrib "StimOnset", clock.read
>>>
>>>  cnvs.copy targetCanvas, stimLoadRect, stimRect
>>>
>>>  sleep(stimDuration)
>>>
>>>  Display.WaitForVerticalBlank
>>>
>>>  Cnvs.clear ' or something else that erases the stimulus, can be done 
>>> in the following trial
>>>
>>>   
>>>
>>>  Bolded lines: How do I create a stimLoadRect and stimRect image, a is 
>>> asked for? (I did find a script for creating a rect object, but am unsure 
>>> of how to specify dimensions).
>>>
>>>  I assume that pre-defining images and their locations, means I do not 
>>> have to specify them as a SlideObject? (I am guessing I am completely wrong 
>>> here - please feel free to correct me) . I would also assume that the 
>>> stimDuration, must be defined as an attribute? 
>>>
>>>   
>>>
>>>  Assuming I do not have to go through this convoluted path, I have 
>>> another question. If I could pre-load using the SlideImage and ImageDisplay 
>>> options, I am not sure how to specify the co-ordinates of where I want my 
>>> image to be in the properties section. I know this appears elementary, but 
>>> the actual size of the images are 424 X 283, but when running, part of the 
>>> images are cut off. When I looked at the properties of my slide object, I 
>>> had set the width at 25% . I assumed this was the co-ordinate location in 
>>> relation to the actual screen size. Guessing that this was an error on my 
>>> part, I reset the width to 100%, but that meant that when I looked at the 
>>> slideobject (with the dotted grid), one image seemed to complete cover the 
>>> other image. How do I fit both images, and make sure their dimensions 
>>> remain the same?
>>>
>>>
>>>  I apologize for this rant. I only recently switched to e-prime from 
>>> using Inquisit, and am still trying to get a hang of this software tool.
>>>  
>>>
>>> Thanks a ton for your reply,
>>>  
>>> Corona
>>>
>>>  -- 
>>>  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... at googlegroups.com.
>>>  To unsubscribe from this group, send email to 
>>> e-prime+u... at googlegroups.com.
>>>  To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/e-prime/-/5pzrm9S1QnQJ.
>>>  For more options, visit https://groups.google.com/groups/opt_out.
>>>   
>>>    
>>>
>>>   
>>> -- 
>>> 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... at googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> e-prime+u... at googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/e-prime/-/1AKNMHLxx88J.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>  -- 
>> 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... at googlegroups.com.
>> To unsubscribe from this group, send email to 
>> e-prime+u... at googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/e-prime/-/fIy17qBfjrkJ.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>>
>>  

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/T4x3Gov4v8AJ.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120917/7511e557/attachment.htm>


More information about the Eprime mailing list