Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use correct layout dpi to render picture item content
Specifically this fixes very low resolution rendering of PDF files
in layout picture items
  • Loading branch information
nyalldawson committed Sep 27, 2021
1 parent 902ad77 commit f01022e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitempicture.cpp
Expand Up @@ -463,7 +463,7 @@ void QgsLayoutItemPicture::loadPictureUsingCache( const QString &path )
{
bool fitsInCache = false;
bool isMissing = false;
mImage = QgsApplication::imageCache()->pathAsImage( path, QSize(), true, 1, fitsInCache, true, &isMissing );
mImage = QgsApplication::imageCache()->pathAsImage( path, QSize(), true, 1, fitsInCache, true, mLayout->renderContext().dpi(), &isMissing );
if ( mImage.isNull() || isMissing )
mMode = FormatUnknown;
break;
Expand Down

0 comments on commit f01022e

Please sign in to comment.