identify broken images
Ken Ray
kray at sonsothunder.com
Tue Dec 28 00:33:35 EST 2004
On 12/27/04 6:03 AM, "Thierry Arbellot" <thierry.arbellot at wanadoo.fr> wrote:
> Hi,
>
> Have you tried the size property on the image ?
> if the size of image "im_1" = 0 then ...
>
> Thierry
>
> On Monday, Dec 27, 2004, at 00:11 Europe/Paris, Claus Dreischer wrote:
>
>> Hi,
>>
>> i have a small problem i don't see a simple solution for.
>> Maybe someone here has one.
>>
>> I want to display JPGs from file, so i make a
>>
>> put URL ("binfile:" & my_file) into image "im_1"
>>
>> This is working OK.
>> But when the JPG in the filepath my_file is faulty (broken download or
>> something)
>> The above line displays an empty image "im_1".
>>
>> I now want to identify these faulty images.
>> I tried the following with no result:
>>
>> if the imagedata of image "im_1" is not empty then ...
>>
>> if image "im_1" is not empty then ...
>>
>> if the length of image "im_1" > 0 then ...
>>
>>
>> Has anyone an idea how to identify an "empty" image?
>> (its not realy empty but nothing is displayed)
Can't you just say:
if there is a file (the fileName of image "im_1") then
answer "it's cool"
else
answer "it's missing"
end if
Or am I missing something?
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list