Storing images

Ken Ray kray at sonsothunder.com
Thu Feb 6 10:57:01 EST 2003


Only one comment I'd make, and that is that:

  set the imageData of image 1 to the imageData of image 2

requires both images to have the same width and height, whereas:

  put image 1 into image 2

causes image 2 to resize to fit the size of image 1 automatically.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Scott Rossi" <scott at tactilemedia.com>
To: <use-revolution at lists.runrev.com>
Sent: Wednesday, February 05, 2003 1:14 PM
Subject: Re: Storing images


> Recently, "Jim Hurley"  wrote:
>
> >>> A more elegant or less cumbersome solution (and idiot proof for the
> >>> end user) would be to embed the single images in some "secret" place
> >>>  from which they might  be referenced and a different size  and
> >>>  location for the image could be locked  on each card.
> >>
> >> Again, a group is one solution.  Or, place all your master images into
a
> >> substack "library" and create images and/or buttons that reference the
> >> substack.
> >
> > Thank you for this suggestion. A group wouldn't work for me--the
> > image is to be placed only on selective cards.
>
> Just in case you didn't catch this, groups *can* be placed on selective
> cards.  You can either manually place groups on the cards you want, or
> create a series of cards with the group applied and then remove the group
> from cards as needed.
>
>
> > But importing from a
> > substack might. How does one import the image from the subgroup to
> > the main stack?
>
> You don't need to import the image (it's already in your stack!), you
simply
> reference the id of the image:
>
>   set the icon of btn display to id of img source of stack library
>
> Or set the imageData of your target image (which effectively duplicates
the
> source image, as opposed to referencing it, as above):
>
>   set the imageData of img display to \
>     the imageData of img source of stack library
>
>
> > And may the image then be sized on each card in the
> > main stack when imported without appending a preOpenCard script?
>
> How would you expect to resize an image without using a script?
>
> In any event, as Björnke noted, setting the imageData of one image to
> another apparently requires that the width/height of both image objects be
> equal.  Then imageData can be set without issue, and the target image can
be
> resized as needed.
>
>   set rect of img display to rect of img source of stack library
>   set imageData of img display to imageData of img source of stack library
>
> Bottom line is, if you need the ability to resize images, you'll need to
> work with image objects, not referenced buttons.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
> -----
> E: scott at tactilemedia.com
> W: http://www.tactilemedia.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list