Crop an animated gif and center in QMovie

429 views Asked by At

Is there any way to crop an animated gif set inside a QMovie widget? I'm running into the issue where my animated gif is too big for the QMovie widget so I'm only seeing the top left portion of the gif. The animated gif is stored inside a QByteArray.

I've tried opening it up with Pillow's Image.open, cropping with img.crop(...) and saving it back into the QByteArray but that ends up only cropping and saving the first frame of the animated gif.

If cropping the gif is not possible, is there a way to center the gif inside the QMovie widget so that I see the center section of the animated gif?

I'm working with Python 2.7 and PySide.

Thank you!

0

There are 0 answers