| image morph |

image := Form fromFileNamed: 'path/(.jpg|.png)'.
morph := image asMorph.
morph openCenteredInWorld.
morph addAlarm: #delete after: 2000 "ms".

----------------------------
Ps. Pharo UI runs at 50Hz

Best regards,
Henrik

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
William L. Cleveland
Sent: Monday, November 28, 2016 9:43 PM
To: pharo-users@lists.pharo.org
Subject: [Pharo-users] Flashing short duration images in a window

I want to write code to flash a color image of a person in a window for a short 
period of time. The duration of the flash is important, not the frequency of 
the flashes, which will be low and probably controlled by pressing a key.

Ideally, the duration should be an integral number of frames, starting from 1 
and increasing to a much larger number. With a 60 Hz monitor, one frame would 
be 0.0167 seconds. The images would be low to moderate resolution, e.g. 70K to 
1 Mb

Can this be done entirely in Pharo or would it be necessary to use the Unified 
FFI with operating system commands? If it can be done in Pharo, what are the 
classes needed to display an image filed in from the hard drive?

I am using a 27 inch iMAC (10.11.6) with 4GHz, 8 GB ram, and AMD Radeon R9 
M395X 4096 MB video card. Pharos is new to me but I wrote Smalltalk code with 
VisualWorks a few years back.

Thanks very much.

Lou Cleveland

Reply via email to