Originally Posted by
jacek
- Why do you use both QImage and QPixmap?
Conversion between QImage and QPixmap costs, especially on X Windows, so better use only QPixmaps (unless you have to access individual pixels).
- Have you read QPixmap::scaledToWidth() docs?
If yes, do it again, but this time very carefully. Pay attention especially to the "const" keyword at the end of signature and the return type.
if const at end i make a copy is right? ... now run ... ist very fast on transform...
now qt4 taken moore points .... as Imagemagic on server..
But now to save i must go toImage () const : QImage ... QPixmap dont save ... not found
bool save
( const QString & fileName,
const char * format,
int quality
= -1 ) const
bool save ( const QString & fileName, const char * format, int quality = -1 ) const
To copy to clipboard, switch view to plain text mode
/* running so ..*/
void Gui_Image::ModpicsChanged(int newvalue_w) /* int from QSlider 20px steeps */
{
qDebug() << "### copyofimagefile... " << copyofimagefile;
QPixmap scaled
= pic.
scaledToWidth(newvalue_w
);
centrale->setPixmap(scaled); /* label */
centrale->adjustSize(); /* label */
actual = centrale->pixmap()->size();
qDebug() << "### Draw image and dispay new W x H px... ";
}
void Gui_Image::ModpicsChanged(int newvalue_w) /* int from QSlider 20px steeps */
{
qDebug() << "### copyofimagefile... " << copyofimagefile;
QPixmap pic(copyofimagefile);
QPixmap scaled = pic.scaledToWidth(newvalue_w);
centrale->setPixmap(scaled); /* label */
centrale->adjustSize(); /* label */
actual = centrale->pixmap()->size();
qDebug() << "### Draw image and dispay new W x H px... ";
}
To copy to clipboard, switch view to plain text mode
Bookmarks