There could be a problem using this approach, in that 'set the 
filename' always performs trimWhiteSpace, which can change the 
dimensions if there is white fill area in the image.

I suggest using importFileInto with the parameter setting [#trimWhiteSpace: 0].

see d8's readme or d8.5's help file for more details

hth

-Buzz

At 11:40 AM -0500 11/16/01, Robert Wingate wrote:
>I've got an old app that's using the following function to determine the
>dimensions of an external graphic file:
>
>
>on GetDimensions( strExternalImageFile )
>
>   -- Temporarily read file into memory
>   newMember = new( #bitmap )
>   newMember.filename = strExternalImageFile
>
>   -- Read its dimensions
>   dimensions = [ #width: newMember.width, #height: newMember.height ]
>   member(newMember).erase()
>
>   return dimensions
>end
>
>
>Can anyone think of a better way to do this?
>
>Thanx,
>Rob
>
>/*********************************
>* Rob Wingate, Software Human    *
>* http://www.vingage.com         *
>* mailto:[EMAIL PROTECTED] *
>*********************************/
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to