diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2025-08-04 03:29:51 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2025-08-08 06:40:51 +0300 |
commit | 00aca3f2d1b56a10aa71a372041230d317efabe5 (patch) | |
tree | 48fe4baff648f59fa0b447d68de5c01517f8c5cf /src/exporters/cookmlexporter.cpp | |
parent | 8f59af1291a8e2536b311f86e1c0b442e7ad26df (diff) | |
download | krecipes-r14.1.x.tar.gz krecipes-r14.1.x.zip |
Use TQImage rather than TQPixmap in the backend-oriented coder14.1.x
TQImage is more suitable for i/o operations and long-term storage rather
than TQPixmap (which is better for immediate display on the screen). The
UI rarely does displays all those photos and does it one-by-one (i.e.
there is no big gallery), so there is no significant performance penalty
for the use of TQImage. On the contrary this way we should save some
memory on allocations associated X11 stuff for pixmaps and loading time
when the database contains a lot of photos.
Note that there is yet another use of TQPixmap in `htmlexporter` which
cannot be replaced because it uses TQPainter, which didn't supported
QImage until Qt5.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit a6ab7f1c6dcf3076aa5488a790d81f42cbc93b48)
Diffstat (limited to 'src/exporters/cookmlexporter.cpp')
-rw-r--r-- | src/exporters/cookmlexporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/exporters/cookmlexporter.cpp b/src/exporters/cookmlexporter.cpp index f8f9d40..f3dcdcf 100644 --- a/src/exporters/cookmlexporter.cpp +++ b/src/exporters/cookmlexporter.cpp @@ -90,7 +90,7 @@ TQString CookMLExporter::createContent( const RecipeList& recipes ) TQBuffer buffer( data ); buffer.open( IO_WriteOnly ); TQImageIO iio( &buffer, "JPEG" ); - iio.setImage( ( *recipe_it ).photo.convertToImage() ); + iio.setImage( ( *recipe_it ).photo ); iio.write(); picbin_tag.appendChild( doc.createTextNode( KCodecs::base64Encode( data, true ) ) ); |