Name: size

Type: property

Syntax: get the size of <object>

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

Associations: image

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, 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(glossary)>
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(glossary)> takes up.

The <size> <property> of a <stack> is always 10000. For <stacks>, this
<property> is included in <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: heapSpace (function), hasMemory (function), stacks (function),
files (function), diskSpace (function), object (glossary),
property (glossary), LiveCode (glossary), audio clip (glossary),
EPS (glossary), HyperCard (glossary), video clip (glossary),
byte (glossary), image (keyword), integer (keyword), stack (object),
filename (property)

Tags: file system

