How to add images to Image Library: This Stack (Button Icon)

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

How to add images to Image Library: This Stack (Button Icon)

Post by alex298 » Tue Apr 29, 2008 10:43 am

Hi,

How can I add images to the Button's Icon - Image Library: This Stack? I searched the doc and cannot find an anwer.

Thanks and best regards
Alex
Nice to meet all of you.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Tue Apr 29, 2008 11:26 am

Hi Alex,

as it says: This stack: XYZ!

This means that all images that are already in "This stack: XYZ" are listed here.
Sounds like a typical "chicken and egg" problem ;-)


Best

Klaus

alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

Post by alex298 » Wed Apr 30, 2008 3:09 am

Hi Klaus,

Actually I did notice that all images that used in the stack listed here. However all images must be linked with the source files. In other words, when I removed or renamed the source images, the images in the stack and Image Library disappeared. I tried the "Preload in memory" but not working.

Take your amazing stack "The taming of the animated Gif" as an example, all images do not need to link with the source files. That's why I wonder if the images can be added and saved to the Image Library with the stack.

How can the images in the Image Library do not need to link with the source files?

Best regards
Alex
Nice to meet all of you.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed Apr 30, 2008 5:34 am

Rather than referencing external image files, you can also import these images - in the Rev IDE, go to the File menu, then to the Import as control submenu, and pick the option Image file...

All imported images are available in your stack's Image Library, and can be used as button icons, background patterns, etc. As a bonus, you can't forget them when you build your final standalone application.

Hope this helped,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

Post by rozek » Mon Jun 16, 2008 5:54 pm

Hmmm,

perhaps, I'm not "bon" enough for that "bonus" you mentioned before, but: I've imported a PNG image which I want to use as stack background texture and it does not show up in the final stand-alone application.

Everything works fine, though, if I start the .rev file (I verified the operation by moving the original image file away) I even moved the .rev to a different machine: everything was fine...but the stand-alone application simply ignores the applied texture :-(

I'm using 2.9.0 and built a WinXP stand-alone on a WinXP machine. (perhaps I should check other platforms as well)

Do you have any idea what might go wrong?

Thanks in advance for any help!
Kind regards,

Andreas Rozek

rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

Post by rozek » Mon Jun 16, 2008 6:01 pm

Oh,

I got it: it seems that one has to build a WinXP stand-alone on a MacOSX machine (no kidding!!!!) - then the image is properly included. (Bad for those without a MacOSX license of Revolution)

Seems, as if I should file a bug report...
Kind regards,

Andreas Rozek

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Jun 17, 2008 8:25 am

Dear Andreas,

The operating system on which you build the standalone doesn't affect the inclusion of images in your project.

If you made your stack on machine A and build it on machine B, you have to make sure that the standalone builder can find all files. Particularly if you use absolute file paths, this can be a problem.

The easiest way to avoid these problems is by importing the image the way Jan describes.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

Post by rozek » Tue Jun 17, 2008 10:33 am

Mark,

you are certainly right. My problem, however, is different: a .rev file built on machine A does not produce a proper standalone on the same machine, while - after transfering the .rev file from machine A to machine B - the other machine built it properly. This "prooves", that the images have been properly imported before...

What makes it even more interesting is, that machine B runs a different operating system than machine A, but builds properly for the latter ;-)
Kind regards,

Andreas Rozek

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Jun 21, 2008 12:10 am

Dear Andreas,

Nothing is being proved, except that the picture is available on one machine, but not on another. I guess you imported the picture files as referenced controls rather than embedded controls.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

Post by rozek » Sun Jun 22, 2008 7:32 am

Dear Mark,

but in that case the (then "referenced") images should not appear on a different machine if only the .rev file was transferred to it, should it?

Thus, the image wasn't just "referenced", but properly "imported" which was the underlying idea of my "proof"
Kind regards,

Andreas Rozek

Post Reply