[PyQt] Re: Zoom or scale into an QImage

Markus Feldmann feldmann_markus at gmx.de
Wed Feb 11 00:45:04 GMT 2009


David Boddie schrieb:
> On Tue, 10 Feb 2009 22:45:51 +0100, Markus Feldmann wrote:
> 
>> i have an QScrollArea where i inserted a QLabel.
>> This QLabel includes an QImage.
>>
>> I want to zoom/scale into this image.
>> How can i do this?
> 
> Try one of these approaches:
> 
> 1. Keep the original image and show a scaled copy in the label, making sure
> that you resize the label to the size of the scaled image.
First i have to read the docu, but let me know is this
also a way for performance tuning?
My Picture is about 20Mbyte big, so i want to speed up
the programm.
> 
> 2. Alternatively, call setScaledContents(True) on the label and resize it.
> 
> The Image Viewer example takes the second approach.
I will also try this.

Thanks i am going to bed :-)
Regards Markus



More information about the PyQt mailing list