Re: 295 png import images

2011-10-12 Thread Phil Davis
It didn't work here - 'filename' isn't a button property, and setting the icon 
to a url doesn't work either. However, you can make an image object act pretty 
much like a button, responding to mouse clicks and such.


Phil


On 10/11/11 8:36 PM, Andrew Meit wrote:

Phil,

Darn, forgot about that, will experiment
I can't remember if setting an icon of a btn via filename works??

thank you

On Oct 11, 2011, at 11:17 PM, use-livecode-requ...@lists.runrev.com wrote:


Can you make it work with 295 image objects that
each have a 'filename' property pointing to one of the images on your HD? It
seems to me that might be less taxing to LC.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Keith Clarke
Do you need to have all 295 layers presented at once in full resolution?

Could you perhaps use thumbnails for initial button presentation and then pull 
in the detailed layers as needed?

If you're layering the images, could you use a snapshot to contain the set of 
all underlying layers as a new layer is added?
Best,
Keith..

On 12 Oct 2011, at 07:06, Phil Davis wrote:

 It didn't work here - 'filename' isn't a button property, and setting the 
 icon to a url doesn't work either. However, you can make an image object act 
 pretty much like a button, responding to mouse clicks and such.
 
 Phil
 
 
 On 10/11/11 8:36 PM, Andrew Meit wrote:
 Phil,
 
 Darn, forgot about that, will experiment
 I can't remember if setting an icon of a btn via filename works??
 
 thank you
 
 On Oct 11, 2011, at 11:17 PM, use-livecode-requ...@lists.runrev.com wrote:
 
 Can you make it work with 295 image objects that
 each have a 'filename' property pointing to one of the images on your HD? It
 seems to me that might be less taxing to LC.
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 -- 
 Phil Davis
 
 PDS Labs
 Professional Software Development
 http://pdslabs.net
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Jan Schenkel
Hi Phil,

The trick is to use an image, set the icon of the button to the id of said 
image, and then change the filename of the image; your button will 
automagically be repainted when you change the filename of the image control.

As a quick test, I created a stack with a button and an image; I named the 
image control MyButtonIcon; and then I set the script of the button to:
##
on mouseUp
   answer file Select an image for my icon
   if it is empty then exit mouseUp
   set the fileName of image MyButtonIcon to it
   if the icon of me is 0 then set the icon of me to MyButtonIcon
end mouseUp
##

When I click the button, I can go find an image file and the button gets it as 
a shiny new icon :-)


HTH,

Jan.

Jan Schenkel

=
Quartam Reports  PDF Library for LiveCode
www.quartam.com


=
As we grow older, we grow both wiser and more foolish at the same time.  (La 
Rochefoucauld)




- Original Message -
From: Phil Davis rev...@pdslabs.net
To: How to use LiveCode use-livecode@lists.runrev.com
Cc: 
Sent: Wednesday, October 12, 2011 8:06 AM
Subject: Re: 295 png import images

It didn't work here - 'filename' isn't a button property, and setting the icon 
to a url doesn't work either. However, you can make an image object act pretty 
much like a button, responding to mouse clicks and such.

Phil

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Phil Davis

Ahh! Very clever! It seems this old dog is still learning new tricks.  ;-)

Phil


On 10/12/11 2:23 AM, Jan Schenkel wrote:

Hi Phil,

The trick is to use an image, set the icon of the button to the id of said 
image, and then change the filename of the image; your button will 
automagically be repainted when you change the filename of the image control.

As a quick test, I created a stack with a button and an image; I named the image control 
MyButtonIcon; and then I set the script of the button to:
##
on mouseUp
answer file Select an image for my icon
if it is empty then exit mouseUp
set the fileName of image MyButtonIcon to it
if the icon of me is 0 then set the icon of me to MyButtonIcon
end mouseUp
##

When I click the button, I can go find an image file and the button gets it as 
a shiny new icon :-)


HTH,

Jan.

Jan Schenkel

=
Quartam Reports  PDF Library for LiveCode
www.quartam.com


=
As we grow older, we grow both wiser and more foolish at the same time.  (La 
Rochefoucauld)




- Original Message -
From: Phil Davisrev...@pdslabs.net
To: How to use LiveCodeuse-livecode@lists.runrev.com
Cc:
Sent: Wednesday, October 12, 2011 8:06 AM
Subject: Re: 295 png import images

It didn't work here - 'filename' isn't a button property, and setting the icon
to a url doesn't work either. However, you can make an image object act pretty
much like a button, responding to mouse clicks and such.

Phil

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Andrew Meit

On Oct 12, 2011, at 9:55 AM, use-livecode-requ...@lists.runrev.com wrote:

 Could you perhaps use thumbnails for initial button presentation and then 
 pull in the detailed layers as needed?
-- Thats what am trying to avoid having to do.

 
 If you're layering the images, could you use a snapshot to contain the set of 
 all underlying layers as a new layer is added?
-- No, I need dynamic showing/hiding as a user peels on and off the layers to 
study how the art is applied to the page.
Because everything is put into ram, I am hitting a wall. And I need to keep the 
images large enough to allow users see the page at actual size due to the art 
design is complex. 

If LC supported SVG and SVG effects, perhaps a vector approach but then is 
there a limit to how many data points to a path?? One of the biggest 
disappointments for me in 5.0 is the lack of improved vector support and the 
styled unicode field. Rev is till stuck in a 1985 bitmap world. Sigh.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Andrew Meit
Jan,

cool, but I still need 295 large images and buttons on a card for each unique 
layer btn, right? if so, hits the ram wall again...

andrew

On Oct 12, 2011, at 9:55 AM, use-livecode-requ...@lists.runrev.com wrote:

 The trick is to use an image, set the icon of the button to the id of said 
 image, and then change the filename of the image; your button will 
 automagically be repainted when you change the filename of the image control.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Klaus on-rev
Hi Andrew,

Am 12.10.2011 um 18:47 schrieb Andrew Meit:

 Jan,
 
 cool, but I still need 295 large images and buttons on a card for each unique 
 layer btn, right? if so, hits the ram wall again...

if you need to show all of these images at the same time, then you are 
obviously erm... licked!
I guess even a dedicated image editing app like PhotoShop or Pixelamator would 
choke on this task!

If not you would only need to load the images that you want to show (as icons 
in buttons) dynamcially.

 andrew

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major.on-rev.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Bob Sneidar
Vector graphics is a tough nut to crack. Think postscript. Perhaps the better 
approach would be for someone to make an external that tied into a real 
postscript library (but then there is licensing) and provided some fairly basic 
commands that allowed the user to programmatically create real vector objects. 

But then of course people will want to edit those objects, and doing it 
natively in Livecode would be a nightmare. I suppose then the external would 
have to provide an editing window. Then people would want layers, and 
transparency effects and before you know it, someone just rewrote Adobe 
Illustrator! LOL! 

Maybe the better thing after all is to create vector objects in an app that is 
made for it, then export as a png? 

Bob


On Oct 12, 2011, at 9:42 AM, Andrew Meit wrote:

 If LC supported SVG and SVG effects, perhaps a vector approach but then is 
 there a limit to how many data points to a path?? One of the biggest 
 disappointments for me in 5.0 is the lack of improved vector support and the 
 styled unicode field. Rev is till stuck in a 1985 bitmap world. Sigh.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Richard Gaskin

Andrew Meit wrote:

 Jan,

 cool, but I still need 295 large images and buttons on a card
 for each unique layer btn, right? if so, hits the ram wall again...

Beyond the limits of RAM we have in nearly everything short of a 
supercomputer, on what monitor will you be able to display 295 images at 
1900 x 2200px each?


Even a single row of just 50 such images will require a monitor more 
than 100 feet wide.


On even the largest consumer monitor only a very few of those images can 
be displayed at any given moment, with most of them cropped at the 
display's edge.


Normal amounts of RAM and LC's native performance should be sufficient 
for displaying what's possible.


If you don't really need to show 295 large images but instead will be 
showing only thumbnails, you'll want to generate the thumbnails one at a 
time first (won't take too long and if you cache them it only needs to 
be done once).


If you're only showing a few at a time you should be able to swap out 
the filename of the source image on the fly as needed.


What exactly is this UI doing?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Keith Clarke
 If you're layering the images, could you use a snapshot to contain the set 
 of all underlying layers as a new layer is added?
 -- No, I need dynamic showing/hiding as a user peels on and off the layers to 
 study how the art is applied to the page.

But surely, at any given time, what the user sees on screen is only the layer 
being 'peeled' and the net effect of all underlying layers?

So, you could use just two images in RAM at any time: layer n and a snapshot of 
layers 1 to n-1

You can store not only the 295 individual layer files but also 294 snapshot 
files of layer 1, 1+2, 1+2+3... 1+2+3...(n-1) 

When a new layer is added, create a new snapshot of the previous snapshot plus 
the last image.

If the point of your app is to work down through the layers, you can pre-build 
the set of snapshots to be displayed under any specific layer.

The order of layers could be defined in a list field, so you (or the user) can 
select the 'peel' and its underlying snapshot.

This list could drive a loop routine that rebuilds the snapshots iteratively 
from layer-1 up.

If the order of layers is changed, you know from how far back down the list the 
set of snapshots needs to be rebuilt.  
HTH
Keith..
  


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 295 png import images

2011-10-12 Thread Terry Judd

On 13/10/2011, at 03:42 AM, Andrew Meit wrote:

 
 On Oct 12, 2011, at 9:55 AM, use-livecode-requ...@lists.runrev.com wrote:
 
 Could you perhaps use thumbnails for initial button presentation and then 
 pull in the detailed layers as needed?
 -- Thats what am trying to avoid having to do.
 
 
 If you're layering the images, could you use a snapshot to contain the set 
 of all underlying layers as a new layer is added?
 -- No, I need dynamic showing/hiding as a user peels on and off the layers to 
 study how the art is applied to the page.
 Because everything is put into ram, I am hitting a wall. And I need to keep 
 the images large enough to allow users see the page at actual size due to the 
 art design is complex. 

Can the user insert/remove layers in any order or is there a definite sequence? 
If it's the latter then you could create 295 composited images - the first 
'containing' only 1 layer, the last all 295. Store them all externally and just 
set the filename of a single image object. Add or remove a layer and you simply 
increment or decrement the filename. You could easily create these composited 
images in LC using just 2 overlaid image objects. If your filenames go 
something like orig001 to orig295 for the layer images and comp001 to comp295 
for the composited images then you'd start off with orig001 (image 1) and 
orig002 (image 2) in the image objects and export a snapshot of these to create 
comp002. Then set the filename of image 1(bottom) to comp002 and the filename 
of image 2 to orig003 and export another snapshot (comp003). Keep going until 
you have 295 new images (orig001 also becomes comp002). Now you can use a 
single image object to display your composited layers and a couple of buttons 
to pile them on and take them off.

Terry...

 
 If LC supported SVG and SVG effects, perhaps a vector approach but then is 
 there a limit to how many data points to a path?? One of the biggest 
 disappointments for me in 5.0 is the lack of improved vector support and the 
 styled unicode field. Rev is till stuck in a 1985 bitmap world. Sigh.
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode