[squeak-dev] quick handling of graphics files

Ross Boylan ross at biostat.ucsf.edu
Wed Apr 14 01:37:58 UTC 2010


I have PNG files with document scans, and would like to view them as
part of an application.  I will also need to scale and/or pan them.

One file took over a minute to open when I selected "open graphic in
window" from the file browser.  (ImageReadWriter formFromFileNamed:
'myfile.png') asMorph openInHand had about the same speed.

I'm looking for advice on how to speed that up, or the information that
is not possible.  I found a similar question on the newbie list, but no
one answered it.

I'm guessing that it is the initial read and translation of the file
that's taking the time, since resizing the image is much faster than
loading it.

This is really too slow to be practical, and much slower than
imagemagick's display command, which opens in under 5 seconds.

The image is a 400dpi black and white scan of an 8.5x11" page; the file
is 144k bytes.

BTW is there any particular reason the file browser opens a SketchMorph
while asMorph on the ImageReadWrite result produces an ImageMorph?  The
former is closer to what I want since it is resizeable and not
transluscent; on the other hand, the comment in SketchMorph says they
are produced by the PaintBox, which is not true in this case.

Squeak 3.10.2 on Linux with 32 bit color in X.  I think squeak is using
32 bit color as well, but couldn't find the setting on a quick look (not
in preferences browser).




More information about the Squeak-dev mailing list