Page 1 of 1

image files & their location

Posted: Fri Dec 12, 2014 7:57 pm
by Jellobus
Hi All :D

I have over hundred image files attached in the App. They are attached as copy files in standalone settings.
The images will be consistently changed in the app. I like to achieve a shorter response time when image changes.

The attachment locations will be outside or inside of the stack. They are either attached as copy files(standalone application setting) or saved in the sub stack as import controls.(File>Import As Control>Image File..)

Would anyone tell me which way is better for the faster & stable performance?

Cheers,


Louis

Re: image files & their location

Posted: Fri Dec 12, 2014 9:46 pm
by Klaus
Hi Louis,

how are you changing images?
Using ICONS in butttons seems to me the fastet method to "change images" :D


Best

Klaus

Re: image files & their location

Posted: Fri Dec 12, 2014 10:32 pm
by Jellobus
Hi Klaus,

The app shows pictures. I currently I attached picture images as copy files.
The current script is

set the filename of image "picture" to "/bigImage/image_1.png"

but I am considering save pictures in the substack if it is faster.. the script will be

put image "image_1" of stack "substack" into image "picture" of stack "mainstack"

can you tell which one is better? and using icon is better way than using image ?

Cheers,

Louis

Re: image files & their location

Posted: Fri Dec 12, 2014 11:30 pm
by Klaus
Hi Louis,
Jellobus wrote:...The current script is
set the filename of image "picture" to "/bigImage/image_1.png"
OK; the question is, is this method not fast enough?
At what "frequency" do you need to display the images?


Best

Klaus

Re: image files & their location

Posted: Fri Dec 12, 2014 11:52 pm
by Jellobus
Hi Klaus,

if users click small image then big image pops up. the big image appears about 10-20 times per minute.

Cheers,

Louis

Re: image files & their location

Posted: Sat Dec 13, 2014 12:01 pm
by Klaus
Hi Louis,

OK, that answers my question about "frequency", but the other answer ist still missing:
Is this method (setting the filenane) not fast enough for your purpose?
It should be, LC really does not take more than 2 seconds to load and display an image! :D


Best

Klaus

Re: image files & their location

Posted: Sat Dec 13, 2014 6:45 pm
by jacque
I have a similar stack that displays many images on demand. They are stored as imported controls and the response time is very fast (I don't use icons, I do what you describe and replace the content of an existing image.)

There's a caution with this method. The engine caches images and if there are many large ones you can run out of memory and the app will crash. The workaround is to store the images in an unplaced group so they will not be cached. Keeping them in a substack should also do the same thing unless you open the stack directly.

But I would time the two methods and see if there is any significant difference. I doubt there would be very much,and the engine is optimized to read images from disk.

Re: image files & their location

Posted: Thu Dec 18, 2014 12:34 am
by Jellobus
Hi Jacque,

The image files are about 100 pics and 39MB in total. is it safe to attach them as copy files? if it could be crashed I must rework with my stack.
There's a caution with this method. The engine caches images and if there are many large ones you can run out of memory and the app will crash. The workaround is to store the images in an unplaced group so they will not be cached. Keeping them in a substack should also do the same thing unless you open the stack directly.
you suggested two things,

1. Store the images in an unplaced group
2. Keeping them in a substack <---what I am doing now

I got the #2 but what unplaced group mean in #1?

Cheers,

Louis

Re: image files & their location

Posted: Thu Dec 18, 2014 4:51 am
by zaxos
My guess is #1 he means invisible group... wich is good and by the way if your images are 39 mb then your standalone exe will also be about 50mb, when executed it will also be using up to 50mb ram wich isnt that much... You see where that gets, if your images get bigger then your standalone will be bigger, and use more ram and goes on..

Re: image files & their location

Posted: Thu Dec 18, 2014 6:08 am
by jacque
An unplaced group is not an invisible group. If you put 39 megs of images into an invisible group, the app may crash on machines with low memory, because the engine will try to cache all of them even if they can't be seen.

To create an unplaced group, put all the images into a group, select the group, and then choose "remove group" from the Objects menu. That will remove the group from the card, but it will still exist and the images can be referenced normally. Since they are not placed on the card they will not be cached.

However, with that many images, I think I would reference them as external images by filename. The engine is optimized for that.

Re: image files & their location

Posted: Thu Dec 18, 2014 7:52 am
by Jellobus
Hi jacque, zaxos,

First of all sorry for the double posting..I got it. but do you know how to hide external image files in the desktop environment? I found that the saved standalone app shows all external files that I don't want users see. any way hide or lock them on the desktop environment?

And unplaced group is new to me..I think my app contains some unplaced group because I deleted some group images while I was building it. if there is unplaced group in the app, how do I clear them?

Cheers,

Louis

Re: image files & their location

Posted: Thu Dec 18, 2014 8:07 pm
by jacque
There is no reliable way to hide images stored externally on disk.

Deleting an image from the stack does not affect the placement of a group that contains the image.If you delete the whole group itself, it is not unplaced; it is deleted and is no longer part of the stack. Groups can be on more than one card at a time, and to do that you "place" an existing group on a card. This is different than copying and pasting a group onto cards, which will create copies of the group and inflate the size of the stack. Instead, a placed group has only the single, original copy which is displayed on every card that it is placed on. Changing anything in that group will update the group for all the cards that use it, since all cards share the same copy of the group.

If a group is not assigned to any card, then it is unplaced. The group exists as part of the stack but is not used anywhere. You can reference objects in it normally but it is not part of the message path and is not shown on screen.

If a group is not placed on a card, it will be available in the Place Group menu item. To find out if the group is not placed on any cards, you'd need a little script that tests each card to see if it contains a group by that name.

Re: image files & their location

Posted: Fri Dec 19, 2014 12:21 am
by Jellobus
Hi Jacque,

so I guess that the advantage of creating an unplaced image group is as good as importing images to the substack because substack is never be seen? or it's different approach?

Cheers,

Louis

Re: image files & their location

Posted: Fri Dec 19, 2014 4:35 am
by jacque
Yes, a substack would work the same way, as long as you don't view the card with the images. If viewed, they will be cached. A substack is probably easier if you aren't familiar with how groups work.

Re: image files & their location

Posted: Fri Dec 19, 2014 5:37 am
by Jellobus
alright, thanks for your advice! :D

Cheers,

Louis