Bit Mapped Image Displays

The application pics may be used to display bit mapped images, get responses and measure response times. Currently pics can only display PCX image files with 256 colors.

Program Features


The program displays uncompressed PCX images with 256 colors. The images are expected to reside in a single directory named imagedir. The image file names are given by image. The images must not be larger than the available screen size is and only video modes which support 256 colors (videomode higher than 21) are allowed.


The flag M activates a mask which is shown immediately after the image. The mask is a random pattern of bright and dark dots. The mask size is controlled by maskwidth and maskheight. The individual dot size is controlled by maskcellwidth and maskcellheight. The mask is shown for masktime ms and is created new for each image if the flag N is active. The masking mechanism requires that the flag P is active.


There are two text strings available which may be shown simultanously with the images. The strings are given by text and text2 and their positions are textposx, textposy, text2posx, and text2posy. Since the images use all of the available colors there may be problems to find a text color for showing the text strings. pics does its best to provide two text colors: black (0) and white (1). These are defined in textcolor and text2color.

Note, however, that this restriction only holds for text which is seen simultanously with the images. The message texts are not affected by it.


Each trial starts with a waiting period of intdsptime ms. This time is needed to read the image file and put it into screen memory, although the image still is invisible. If the flag A is set then there is an attention signal of duration attduration and a waiting period of stimwait after the signal is switched off. Then the image and the text strings are switched on. The image is visible for dsptime ms.

If the trial message duration parameter dsptm is nonzero the message dspmsg is shown immediately before or after the image display period. If the flag P is on then the message is shown immediatley after the image has been switched off and the message remains visible until there is a response. Note that the exact value of dsptm is irrelevant in this case and the response time rtime is measured from the start of the message dspmsg.

If the flag P is off and dsptm is nonzero then the message is shown before the image. In this case the start of the message dspmsg finishes the initial pause intdsptime. If dsptm is negative then the message remains visible until there is a response. If dsptm is positive then it gives the duration of the message on screen. In any case attwait gives the pause between the message disappears and the attention signal or the image is switched on. Note that in the latter case attwait has to be long enough to read and write the image.

Response and Feedback

The number of the response key is stored in response and the response time is in rtime. If response is equal to dspstate then the response is considered to be correct and eval is set accordingly. If feedbacktime is positive then the respective feedback messages corrmsg or falsemsg are shown for feedbacktime ms.

Program Parameters

attwait (int)
Time to wait for the attention signal (or the image display, if there is no attention signal) after the text of the trial message has been switched off.

attduration (int)
Duration of the attention signal.

centerx , centery (int)
Screen position of image center.

dspmsg (string)
This string is displayed before or after the image is shown if dsptm is non-zero. It is shown before the image if flag P is off and after the image if it is on.

dspstate (int)
Response event number for a correct response.

dsptm (int)
Duration of dspmsg. If dsptm is negative then display duration is on until a response switch is being pressed. A zero value of dsptm suppresses the display of dspmsg.

eval (int)
Returns whether the response was correct (eval = 0) or not.

feedbacktime (int)
If positive then there is a feedback message shown after the response. If the response event number is equal to dspstate then corrmsg is shown, otherwise falsemsg is shown for feedbacktime ms.

flags (string)
The application rtm uses the following flags:

If A is set, then an acoustic attention signal ist presented before the image becomes visible.

Show count down while waiting in the intdsptime period.

Activates the display of a mask immediately after the image.

Recreates the mask pattern for each single image.

If P is set then the trial message dspmsg is shown after the image otherwise it is shown before the image. Note that this does not affect the strings text and text2 which are always shown together with the image.

Acoustically notify wait key release.

Take response time starting from wait key release event.

image (string)
The image file name.

imagedir (string)
The full access path for the directory where all the image files are.

maskcellheight , maskcellwidth (int)
Size of individual dots in the mask. These parameters are given in screen pixel counts.

maskheight , maskwidth (int)
Size of the mask. These parameters are given in screen pixel counts.

masktime (int)
Duration of image mask.

response (int)
Response key pattern.

rtime (int)
Response time.

sigwait (int)
Waiting time between attention signal offset and target signal start.

text , text2 (string)
These strings are text messages that may be shown simultanously with the image.

textposx , textposy , text2posx , text2posy (int)
Horizontal and vertical center position for the two text signal messages.

textcolor , text2color (int)
For technical reasons the text strings text and text2, which are shown simultanously with the image display, may only be written in black (textcolor = 0) or white (textcolor = 1).

Example Experiments

Stroop Interference in Picture Naming

The following example creates a Stroop-like interference experiment. The subject sees an animal picture with some name written into the image. The name may be an animal's name or some other word. Below the animal image there is another word which always is an animal's name. The subject's task is to repond with "yes" (left response key) whenever the word below the picture gives the name of the animal shown in the picture.

Parameter file bstroop.x from directory \pxl\app\pics

Picture Recognition

The next example is a picture recognition test. Pictures are shown and the subject has to classify them as "new" or "old". This task is the second part of a learning experiment for testing the levels of processing theory of memory.

Parameter file craik2.x from directory \pxl\app\pics

Back to table of contents

Author: Hans Irtel