Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How do you animate a JPEG image?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
zOriginaL




PostPosted: Wed Jun 09, 2010 5:22 pm   Post subject: How do you animate a JPEG image?

What is it you are trying to achieve?
I want to animate an imported JPEG image.
Sponsor
Sponsor
Sponsor
sponsor
Cezna




PostPosted: Wed Jun 09, 2010 5:41 pm   Post subject: RE:How do you animate a JPEG image?

... what exactly do you mean by animate?
If you want to to just move the picture, just have a loop and change the co-ordinates.
If you want it to do something, you will almost certainly need a .gif (which you can make out of the .jpeg using a program like Power Point).
It really depends on the details though.

You're going to have to post some more information if you want to get meaningful help, otherwise your just going to get more or less what I just said, but worded 10 different ways, from 10 different people. Smile
Insectoid




PostPosted: Wed Jun 09, 2010 5:44 pm   Post subject: RE:How do you animate a JPEG image?

You can make animations with jpegs as easily as you can with gifs (more easily actually I think). It just takes a lot more images.

but yeah, you don't actually make things move to animate them. You change their location to make it look like they're moving.
Cezna




PostPosted: Wed Jun 09, 2010 6:39 pm   Post subject: RE:How do you animate a JPEG image?

Well that is movement, movement across the screen.
Since the co-ordinates are changing and movement is defined as displacement over time, /changing the co-ordinates is as much movement as you being in one room and then changing your latitudinal and longitudinal co-ordinates until you are in a different room, hence moving.

(wow, didn't think I would get away with the work latitudinal without the quick reply's spell checked highlighting it...)

Anyway, Insectoid is right, it would take a lot more images to create an animation with .jpegs, as opposed to a .gif, and more images (the larger the bigger the impact), the more memory is required, which may slow down your program, and at the least mean more lines of code than you could have gotten away with had you used a .gif.
zOriginaL




PostPosted: Wed Jun 09, 2010 7:00 pm   Post subject: Re: How do you animate a JPEG image?

Like, I just want to move a picture from say, the top-right corner to the bottom-right corner.
USEC_OFFICER




PostPosted: Wed Jun 09, 2010 7:11 pm   Post subject: Re: How do you animate a JPEG image?

Variables. Use variables damn it! You should know better than this!

Sorry. What with summer break suddenly so close, a lot of people have been asking this. Sorry. Not your problem.

Turing:

var x :int

%Picture loading stuff etc.

View.Set ("offscreenonly")

loop

Draw.Cls ()

%Code

x := x + 1

Pic.Draw (picture, x, y, picMerge)

View.Update ()

end if


Hope this helps.
Insectoid




PostPosted: Wed Jun 09, 2010 7:13 pm   Post subject: RE:How do you animate a JPEG image?

Well, then you just need to change the X and Y coordinates a lot of times and draw the image at each coordinate.

@Cezna, the way Turing handles gifs it takes roughly the same amount of RAM as a pile of jpegs. It's HD space you'd worry about (and really, the two dozen or so pics you'd need for this take up next to no drive space).

EDIT: Usec beat me to it.
Cezna




PostPosted: Wed Jun 09, 2010 7:26 pm   Post subject: RE:How do you animate a JPEG image?

Alright, I didn't know that, I was working off some incorrect assumptions that have once again allowed my noobiness to show through.
Embarassed
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: