Playing animated gif files
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Playing animated gif files
On the desktop I am able to import an animated gif and play it on a different card using this:
put image "airplane.gif" of card "card2" into card image "imageObject"
This doesn't play the animation in the iOS simulator. Is there another way to do this?
put image "airplane.gif" of card "card2" into card image "imageObject"
This doesn't play the animation in the iOS simulator. Is there another way to do this?
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Playing animated gif files
I'm not sure what the point of that is.put image "airplane.gif" of card "card2" into card image "imageObject"
My inclination would be to check iOS documentation as to how it copes with animated GIF images.
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Playing animated gif files
http://www.idownloadblog.com/2017/07/14/gifroll/
Users have requested animated GIF support for years, but Apple waited until iOS 11 (Fall of 2017) to finally implement it.
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Playing animated gif files
Unfortunately, because of storage constraints,
the way that I tend to handle animated GIFS
(in a way that gives full programmatic control over animation)
is probably not worth considering.
the way that I tend to handle animated GIFS
(in a way that gives full programmatic control over animation)
is probably not worth considering.
Re: Playing animated gif files
Hi cmorgan,
welcome to the forum!
Does the GIF on card "card2" play on card "card2"?
Maybe animated GIFs are really not supported by iOS?
I don't know, I don't develop for mobile nor do I own any mobile device like a cellphone etc.
Hint:
... card image xxx
Is only accepted for HC compatibilty, you do not need to write this in LC anymore!
Just use IMAGE or BUTTON or whatever:
...
put img "airplane.gif" of cd "card2" into img "imageObject"
...
Best
Klaus
welcome to the forum!
Does the GIF on card "card2" play on card "card2"?
Maybe animated GIFs are really not supported by iOS?
I don't know, I don't develop for mobile nor do I own any mobile device like a cellphone etc.
Hint:
... card image xxx
Is only accepted for HC compatibilty, you do not need to write this in LC anymore!
Just use IMAGE or BUTTON or whatever:
...
put img "airplane.gif" of cd "card2" into img "imageObject"
...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Playing animated gif files
Hi All,
Possible but very slow (iOS 11.4)
Maybe display a collection of .png would be faster
Best
Jean-Marc
Possible but very slow (iOS 11.4)
Maybe display a collection of .png would be faster
Best
Jean-Marc
https://alternatic.ch
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Playing animated gif files
Indeed: If you open an animated GIF in GIMP it is easy (but tedious) to export its framesMaybe display a collection of .png would be faster
as individual images.
-
Code: Select all
on mouseUp
put 1 into KOUNT
repeat until KOUNT > 32
put ("jump" & KOUNT & ".png") into PIK
set the backGroundPattern of grc "MB" to the ID of img PIK
add 1 to KOUNT
wait 3 ticks
end repeat
end mouseUp
These stills are extracted from an animated GIF
composed from a sequence of photos by Eadweard Muybridge
that came to 512 KB, as did all the still PNG images:
so NO size overhead, pleasantly enough.