Page 1 of 1
SOLVED: gif size
Posted: Sun Sep 06, 2020 1:36 am
by kwnz
Is it possible to make a gif reduce size while moving to points of curve?
The gif is of a walking sheep which moves to the points of a curve (more of a straight line) starting about centre and 2 thirds down of card to bottom right of card.
The purpose is to create a perspective so the sheep gets larger as it nears the front (bottom). Thanks.
I hope I have not been to ambiguous or I see that this could go on for months.
Re: gif size
Posted: Sun Sep 06, 2020 1:07 pm
by richmond62
This is entirely possible except if you are doing this sort of thing:
Code: Select all
on mouseUp
move image "ovine.gif" to the points of graphic "sexyCurve"
end mouseUp
HOWEVER, if, instead of doing a "move to the points" thing you move your image to the points (Yup: sounds mental):
First of all:
1. Put the points of your curve into the lines of a listField (or, if you are more clever than me, into an array).
2. Let's call the listField "sexyPoints".
The do this sort of thing:
Code: Select all
on mouseUp
put 1 into KOUNT
repeat until line KOUNT of field "sexyPoints" is empty
move image "ovine.gif" to line KOUNT of field "sexyPoints"
add 1 to KOUNT
------
-- in here you can do something about the size of image "ovine.gif"
------
wait 10 ticks
end repeat
end mouseUp
Re: gif size
Posted: Sun Sep 06, 2020 1:44 pm
by richmond62
Re: gif size
Posted: Sun Sep 06, 2020 1:59 pm
by richmond62
Although, to be honest, as you want your sheep to travel along a straight line I wouldn't bother with a curve at all:
Code: Select all
on mouseUp
set the loc of img "ovine.gif" to 100,100
set the width of img "ovine.gif" to 45
set the height of img "ovine.gif" to 30
put 2 into SKALE
repeat until SKALE > 7
move img "ovine.gif" to (100 * SKALE, 100 * SKALE)
set the width of img "ovine.gif" to ((15 * SKALE) + 30)
set the height of img "ovine.gif" to ((10 * SKALE) + 20)
wait 4 ticks
add 1 to SKALE
end repeat
end mouseUp
-
Re: gif size
Posted: Sun Sep 06, 2020 2:06 pm
by richmond62
Personally I have always thought that animated GIF images are pretty rubbishy because
they are difficult to control.
For animation I generally split an animated GIF up into its constituent frames and export them as PNG images.
(I always use GIMP for this)
https://www.gimp.org/
-
-
Then use them as
backGroundPatterns in graphic object rectangles.
This means I can go in for fine-grained control and so on in a way that is not possible with animated GIF images.
Re: gif size
Posted: Sun Sep 06, 2020 2:33 pm
by richmond62
-
Everything is in the cardScript.
Re: gif size
Posted: Sun Sep 06, 2020 6:51 pm
by kwnz
Thank you richmond62 for getting to the point (no pun intended) straight away, your answers are much more elegant. I shall try them all and certainly the repeating solution with tweaks to the size so the jump is not so noticeable. Since my post I decided to create half a dozen curves adjacent to each other and base the script on a move for each and a resize line in-between. This worked but tedious and jerky. Thanks again.
Re: gif size
Posted: Sun Sep 06, 2020 6:54 pm
by richmond62
I have been mucking around with animations in LiveCode for about 12 years, so can "ruin your evening"
with quite a few ideas and examples.
