Hi,
I am displaying images in a scrollview. I also have scaling functionality that works without problems on linux. When I do the same on windows the image won't be displayed when the size exceeds approximately 3000x30000 pixels. Is there a problem with Qt or am I doing something wrong?
//
//this code is inside a class that subclasses QScrollView
//
QVBox *box = new QVBox(viewport());
addChild(box);
...
isOk = pixMapScaled_.convertFromImage(
image_.scale(static_cast<int>(image_.width()*scaleFactor_),
static_cast<int>(image_.height()*scaleFactor_)),
conversion_flags_);
if (isOk)
imgLabel_->setPixmap(pixMapScaled_);
else
logger_.error("Could not convert image.");
//
//this code is inside a class that subclasses QScrollView
//
QVBox *box = new QVBox(viewport());
addChild(box);
...
imgLabel_ = new QLabel(box);
isOk = pixMapScaled_.convertFromImage(
image_.scale(static_cast<int>(image_.width()*scaleFactor_),
static_cast<int>(image_.height()*scaleFactor_)),
conversion_flags_);
if (isOk)
imgLabel_->setPixmap(pixMapScaled_);
else
logger_.error("Could not convert image.");
To copy to clipboard, switch view to plain text mode
The scaling and conversion seems to happen without any errors. The image is just not displayed on windows when it gets bigger than 3000x3000 pixels. When scaling out again it will be displayed again.
Thanks, for any help,
Guido
Bookmarks