Hi Martin,

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 ?

I am not sure, but this might have to do with the minimum size that RR allows for objects.


See: -> Preferences -> Object sizes

Ther you can adjust the min value.

But you can still get the correct size of your tiny image with an almost identical
script:


...
unlock error dialogs
put the formattedwidth of last image into xwide
put the formattedheight of last image into hhigh
...

The formattedheidght/formattedwidth will give you the correct value (original size of the image)
and not the size of the image-object, which, in your case, will be min 120*120...


Hope that helps...

martin baxter

Regards


Klaus Major
[EMAIL PROTECTED]
www.major-k.de

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to