Mr Pablo
Mr Pablo

Reputation: 4187

How to scale Movie graphic/animated GIF?

Is it possible to scale a Movie graphic that is an animated GIF?

InputStream is = context.getResources().openRawResource(R.drawable.myGif);
myMovie = Movie.decodeStream(is);
myMovie.draw( canvas, ...);

This is how I am adding my GIF to a canvas. I have read that I can use:

canvas.scale();

But this scales the whole canvas, I just want to scale the movie graphic?

Is it possible?

Upvotes: 0

Views: 954

Answers (1)

pskink
pskink

Reputation: 24740

try:

 canvas.save()
 canvas.scale(....)
 // draw on canvas
canvas.restore()

Upvotes: 1

Related Questions