Picture Size

Sarah Reichelt sarah.reichelt at gmail.com
Thu Nov 23 22:38:50 EST 2006

On 11/24/06, Brad Sampson <programmer711 at gmail.com> wrote:
> I am trying to put a picture or movie into a player, but I want it to
> retain its relative dimentions.  I want to resize the player so that
> it still has the same relative dimentions.  I was planning on getting
> the dimentions of the picture or movie, and then doing some simple
> math.  However, I cannot find out how to get the dimentions of a
> picture or movie without actually opening it in a player that doesn't
> have locked size and position.  I suppose I could have a player that
> is way off of the screen, but that would just be dirty coding, and
> hard to work with.  Is there a way to get the dimentions of a picture
> or movie, or an easier way to do this?

I would open the picture or movie into an invisible object and only
show the player or image after you have set the size. The
formattedHeight and the formattedWidth will give you the real
dimensions regardless of whether the lockLoc is true or false.


More information about the Use-livecode mailing list