imported images smaller than 9 pixels sq

Martin Baxter martin at harbourtown.co.uk
Thu Sep 25 06:52:01 EDT 2003


I've been using the example script from the docs to get image file
dimensions. It's like this:

lock screen -- so user doesn't see the following shenanigans
lock error dialogs -- prevent error window if import fails
import paint from file fname -- creates a new image
unlock error dialogs
put the width of last image into xwide
put the height of last image into hhigh
delete last image -- get rid of image we created
unlock screen
put xwide&","&hhigh

Everything works fine until I use it on an image whose dimensions are < 9
pixels in both dimensions, in which case xwide and hhigh get 120. Behaviour
is the same for gif and jpeg files.

It seems that the script reports the dimensions of an 8*8 pixel image (or
smaller) as being 120*120 pixels, but the dimensions of an 8*9 pixel image
(or larger) are reported correctly.

Couldn't see anything like this in bugzilla, anybody else get this ?

martin baxter





More information about the use-livecode mailing list