Skip to content

Commit

Permalink
Fix a regression followup #46515
Browse files Browse the repository at this point in the history
See comment : #46515 (comment)
  • Loading branch information
elpaso authored and github-actions[bot] committed Jan 21, 2022
1 parent eaa6680 commit c956c73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/maprenderer/qgsmaprendererjob.cpp
Expand Up @@ -373,8 +373,8 @@ QImage *QgsMapRendererJob::allocateImage( QString layerId )
QImage *image = new QImage( mSettings.deviceOutputSize(),
mSettings.outputImageFormat() );
image->setDevicePixelRatio( static_cast<qreal>( mSettings.devicePixelRatio() ) );
image->setDotsPerMeterX( mSettings.devicePixelRatio() * 1000 * mSettings.outputDpi() / 25.4 );
image->setDotsPerMeterY( mSettings.devicePixelRatio() * 1000 * mSettings.outputDpi() / 25.4 );
image->setDotsPerMeterX( 1000 * mSettings.outputDpi() / 25.4 );
image->setDotsPerMeterY( 1000 * mSettings.outputDpi() / 25.4 );
if ( image->isNull() )
{
mErrors.append( Error( layerId, tr( "Insufficient memory for image %1x%2" ).arg( mSettings.outputSize().width() ).arg( mSettings.outputSize().height() ) ) );
Expand Down

0 comments on commit c956c73

Please sign in to comment.