0

I'm trying to incorporate gifs into my project, however the source files are of a small resolution and become blurred when loaded.

In the past when I've used small pictures in QLabels they became blurry when scaled because Qt tries to automatically "smooth" them out when scaling. I fixed it in those circumstances by grabbing the QPixmap and using it's 'scaled()' function with the Qt::FastTransformation argument.

The problem is, I don't see any way of doing this type of a workaround with the existing QMovie class. Is there any way?

Manually scaling my assets in paint programs wouldn't be efficient at all as I'd need many different scales in different situations. If no solution can be found, I suppose I'd just be forced to make my own class, but I'd much rather make use of what's there.

Thanks.

1 Answer 1

1

Don't know if there is a simpler/better way, but the only option I see is to load the frames using QImageReader (use QImageReader::jumpToNextImage to load them all), scale the resulting QImage's using the QImage::scale method with the proper algorithm and then apply to your QLabel.

1
  • Thanks, I'll use this approach to form my own class to handle gifs instead.
    – Yattabyte
    Dec 28, 2014 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.