295 png import images
keith.clarke at clarkeandclarke.co.uk
Wed Oct 12 13:59:07 EDT 2011
>> 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.
More information about the Use-livecode