My blog has been moved to ariya.ofilabs.com.

Tuesday, January 20, 2009

secrets, a sign, a reason

Let us start with a comparison (longer is better):

If you see the my latest graphics example: 50% scaling of (A)RGB32 image, you will find a 10x faster way (compared to QImage::scaled() function) to downscale an image to the half its original size, of course with (approximately) the same visual quality as when you use Qt::SmoothTransformation.

For the readers who also did listened to my Qt Developer Days graphics talk, you can have an idea why I make so much fuss just for image halfscaling :-) Bear with me and we will reach that point.

2 comments:

Anonymous said...

Cool! That only applies to halfscaling though?
Haven't had that use case, usually I have a target size...
And if I want an 1/4 size image, can I just halfscale the halfscaled image (still pretty fast compared to the old way), or will I get a serious penalty in quality?

scroogie said...

I think to get really fast QImage should just load the image partially if it gets scaled down anyway (with some kind of proxy class). I know its not possible with all formats, but with some of them.