Name: size

Type: property

Syntax: get the size of <object> 

Summary: Reports the amount of disk space taken by an <object>.

Associations: image

Introduced: 1.0

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Example:
if the size of image myImage &gt; 20000 then beep

Value:
The <size> <property> reports an <integer>.
This property is read-only and cannot be set.

Description:
Use the <size> <property> to judge how much memory an <object> takes when displayed.

The <size> of an <image>, <EPS|EPS object>, <audio clip>, or <video clip> is is the number of <byte|bytes> of disk space that the <object> takes up.

The <size> <property> of a <stack> is always 10000. For <stacks>, this <property> is included in <Revolution|LiveCode> for compatibility with imported <HyperCard> stacks and does not report a meaningful value.

>*Note:* The size of an image that has a <filename> is always empty. To get the true size of such an image, either use the detailed <files>, or check the length of the file url.

References: image (keyword), integer (keyword), filename (property), heapSpace (function), hasMemory (function), stacks (function), files (function), diskSpace (function), stack (object), object (object), property (glossary), Revolution (glossary), audio clip (glossary), EPS (glossary), HyperCard (glossary), video clip (glossary), byte (glossary)

Tags: file system
