storing images

Ken Norris (dialup) pixelbird at interisland.net
Tue Feb 4 13:49:02 EST 2003


**********

> Date: Wed, 5 Feb 2003 01:51:49 +0900
> Subject: Re: storing images
> From: mark mitchell <cowhead at mac.com>

> I finally understand this thread.  I couldn't figure out how "set the
> icon of button 1 to myImage" could possibly be described as inelegant
> (especially relative to HC's resource fork and pict external).  But it
> sounds like some people are under the impression that setting the icon
> of a button to an image 're-embeds' the image.  It doesn't.  The button
> just references the image within the stack.  So you can reference the
> same imbeded image in a hundred different buttons without increasing the
> memory requirements much.  I remember there was a big thread on this
> about a year or so ago.  Just make a single card or substack called
> 'myImages' and stick all your images there.
----------
I work with images a lot so I want to jump in here.

I see the advantages, but what about switching out images? Maybe you come up
with some much better images and want to change them out. I think (could
easily be wrong) you'd have to reset the images manually by deleting them
and importing new ones, or writing a separate UI somewhere that does it (how
might that work?).

But, I like the defaultFolder idea, because it's all drag and drop. The
caveat is that you have to make sure the ID's and/or names are relevent to
the calls that use them, which would really be the same for imported stuff
too.

I think you have to weigh out how the images are going to be used. Perhaps
combining the two ideas for development purposes might be good. An
ImageBase/library in folders you can import from, and a protected (enter by
password from a menu or something) substack which has thumbnails and a UI
that has routines for adding, deleting, copying, and replacing, and traps
for correct ID's, etc.

Mostly just think/type...but what do you think?

Ken N. 

*********** 




More information about the use-livecode mailing list