Import sequence into image array

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
Srdjan
Posts: 26
Joined: Mon Aug 04, 2008 7:17 am

Import sequence into image array

Post by Srdjan » Fri Feb 26, 2010 2:34 pm

Hi

I would like to know if it's possible to import seq of images into image array.
Is it possible to achive it by using import paint command? How can I put imported paint into array item?
Am I able to import that seq as non compressed images because I want to show them fery fast, as flipbook?

Thanks in advance

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

Re: Import sequence into image array

Post by Klaus » Fri Feb 26, 2010 4:59 pm

Hi Srdjan,

sure this is possible!

1. if the images are already imported:
...
put the text of img "your image1" into my_imgarray[1]
## etc...
...

1.b. :)
Very important:
This requires that ALL images, source and target, have the SAME!!! dimensions (height and width)!!!
See 1.b. below for displaying these data again
...
put the imagedata of img "your image1" into my_imgarray[1]
## etc...
...

2. Import directly from a filepath (folder listing in a repeat loop or whatever)
...
put url("binfile:" & Variable_with_the filepath) into my_imgarray[1]
...
You get the picture!

To put thes items in the array back into images you can then use this in a repeat loop.
You may need to do some testing to see what may be the fastest way, if speed is important!

1. ...
put my_imgarray[1] into img "You animation image here"
...

OR
...
set the text of img "You animation image here" to my_imgarray[1]
...

Solution for 1.b. above and ONLY works with solution 1.b. above:
...
set the imagedata of img "You animation image here" to my_imgarray[1]
...

Hope that helps!


Best

Klaus

P.S.
Just read your post again:
"imagedata" will be "raw" uncompressed data!

Srdjan
Posts: 26
Joined: Mon Aug 04, 2008 7:17 am

Re: Import sequence into image array

Post by Srdjan » Sat Feb 27, 2010 9:07 pm

ho, ho ,ho

This is exactly what I want.

Thank you Klaus very much!

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

Re: Import sequence into image array

Post by Klaus » Sat Feb 27, 2010 9:53 pm

Hi Srdjan,
Srdjan wrote:ho, ho ,ho
This is exactly what I want.
As others here in the forum already experienced I have some basic telepathic capabilities 8)
Srdjan wrote:Thank you Klaus very much!
You're welcome!


Best

Klaus

Post Reply