Page 1 of 1

Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 12:10 am
by ETphonehome
Hello,
Under windows 7 with LiveCode 6.5
I have 2 issues with the "Image area" tool
I read first this post : http://forums.runrev.com/phpBB2/viewtop ... =7&t=13081 (2012, october)
and it looks like I have similar problem.
1) When I draw an image area with the tool, and select a path image with the windows "basic properties", the image always appears in full size... It's really boring (an not easy to manage) to have the obligation to resize despite I draw a correct area first...
2) When it's time for a standalone application under windows 7, images originally put on the stack with the "image area tool", just disapear ! But they still work like control ! It means for me that a sound starts everytime my mouse move into the area of the images like I decided. So they are present and active but just invisible !!! Of course the checkbox "visible" is selected in the basic properties windows.
There is no problem with a File > Import as control > Image File : the image is still visible after standelone creation.

So... Is it me who doesn't know how to use this tool or is it a big bug with no solution since at least one year (october 2012 => november 2013) ?
What do you think ?
Thanks.

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 12:24 am
by FourthWorld
If you want to lock image object to a size other than the image's native size, set its lockLoc property to true.

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 12:43 am
by ETphonehome
Thank you Fourthworld for this advice. It's true that when I use File > Import as control > Image File, without this checkbox "lock size and position" in the windows "properties" (property "size and position"), after making the standalone, images change by themselves their size into the original one !!! Really disturbing. But usefull. I think it's stupid to put a big image if we don't use it at their size. So like this LiveµCode remind us to reduce it in order to avoid to waste weight and memory. I suppose... !
Anyway my problem is with the image area tool. A tool for nothing ?

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 1:18 am
by Simon
Hi ETphonehome,
Take a look at this lesson:
http://lessons.runrev.com/s/lessons/m/4 ... nail-image
For you, the most inportant code is:

Code: Select all

set the imagedata of image tImageName to the imagedata of image tImageName
That will reduce the size (weight and px) of your image permanently.

I've never used the Image Area tool because import does what I want. Most of the time when creating apps they will be used on others machines so a path to an image on your machine is no help.

Simon

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 1:45 am
by ETphonehome
Thank you Simon for these explanation and I will give them a closer look soon. Anyway my question is about the image area tool.
Is it me who is missing something in order to use it properly or is it a tool that doesn't work ?

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 2:12 am
by Simon
Is it me who is missing something in order to use it properly or is it a tool that doesn't work ?
Not sure the path to your image so I can't tell you. However testing here the image showed up in the IDE and standalone.

Now it's a very old tool so I'm not expecting that it's a bug.

Simon

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 11:01 am
by ETphonehome
@ Simon
Thank you for your comments. I haven't a path problem because images appears in LC with this tool ! And with the standalone application the area works perfectly like a "control" ! It's just that images are invisible.
According to other experiences in the forum, my opinion is that the image area tool does'nt really work. If it works inside LC (images appears) and not when it's time for standalone application what kind on interest ? If there's something not possible during conversion why not a warning ?

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 12:34 pm
by Klaus
Hi ET,

well, the IMAGE tool is NOT broken, been using it for the last 13 years without any problem!
So I consider this is a bold statement from a newbie 8)

When you "import as control" an image, Livecode will create a NEW image object and does NOT
use/respect any image object that you might have drawn (at correct size) before.
That's why you will need to resize your image after importing.

Concerning your "disappearing" images:
What pathname did you use an absolute pathname or a relative one?
This is the most important question right now to solve your problem!
I suspect the standalone does not find the images.

Seeing an image inside of an image object or not has NOTHING to do with the way
that (empty) image object reacts to user actions according to its scripts!


Best

Klaus

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 4:42 pm
by ETphonehome
@Klaus
Great thanks : you are perfectly right.
My issue (invisibility) was because of a relative path ! In fact i didn't noticed that when I select an image in the properties window of the image area, the path is :
1) relative and not absolute
2) not able to change by itself, according to the directory where you record the standalone
3) not by default the "external" directory automatically created near the directory of the standalone .exe

With absolute path : Ok immediatly. And with a little reflexion, relative path is OK too.
So the image area tool works but must be used very carrefully.

So two questions :
1) Is there a way to have immediatly the absolute path when we select an image (I use the button with directory icon on the properties windows)
2) how are we suppose to use the directory "external" with images ?

@Simon
I understand better today what you said : «Most of the time when creating apps they will be used on others machines so a path to an image on your machine is no help.» It's true : we avoid troubles when we import datas despite of just a link to reach them.

So two questions to developpers :
1) Why not a "import tool" ? It seems it's more usefull than an area image tool.
2) Why not a tool with the possiility to select if we want an importation or a link. It seems better than a tool on one place and a command from a menu in another place !?

But... Maybe it's me who don't understand the real function of the image area tool ?

Anyway : thanks again at Simon and Klaus. It was helpfull.

Stéphane, France

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 7:21 pm
by jacque
You can change the default behavior of images in LiveCode's preferences. If you always want absolute paths, check the option "Always use absolute file paths for images" in the "Files & Memory" pane. But be careful, because if you do that your images will only display on your own machine.

Re: Tool "Image area" : bug or not ?

Posted: Mon Nov 11, 2013 8:19 pm
by ETphonehome
@Jacque
Thanks for the answer
I found the option "always use absolute file paths for images" in Edit > Preferences > Files and memory and it works.