picture size
Richard Gaskin
ambassador at FourthWorld.com
Sun May 5 07:43:01 EDT 2002
Robert Brenstein wrote:
> Is there a simple way to get the pixel sizes of images (jpeg and gif)
> in Metacard? In HyperCard, I use the picture command to open them
> invisibly (this is important), then fetch the size. The picture
> command does not seem to be part of MetaCard.
>
> picture (fPath & fName),,,false
> get pictureheight of window fName
> get picturewidth of window fName
> close window fName
MetaCard's syntax is arguably more self-consistent with the priciples of
HyperTalk on this one. Rather than relying on an external MC has native
image objects, with properties that can be querried and set like buttons and
fields.
In this case, the property you're looking for is the fileName of the image
object:
set the filename of image 1 to tMyPath
get the rect of image 1
If you don't already have an image object on the card, you can also import
image files into a new image object using the import command.
--
Richard Gaskin
Fourth World Media Corporation
Custom Software and Web Development for All Major Platforms
Developer of WebMerge 1.9: Publish any Database on Any Site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the metacard
mailing list