Skip to content

Commit

Permalink
Use image operation's multiplyOpacity in image cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 5, 2018
1 parent c642533 commit 1e4ad44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/qgsimagecache.cpp
Expand Up @@ -16,11 +16,12 @@
***************************************************************************/

#include "qgsimagecache.h"

#include "qgis.h"
#include "qgsimageoperation.h"
#include "qgslogger.h"
#include "qgsnetworkaccessmanager.h"
#include "qgsmessagelog.h"
#include "qgssymbollayerutils.h"
#include "qgsnetworkcontentfetchertask.h"

#include <QApplication>
Expand Down Expand Up @@ -217,7 +218,7 @@ QImage QgsImageCache::renderImage( const QString &path, QSize size, const bool k
im = im.convertToFormat( QImage::Format_ARGB32 );

if ( opacity < 1.0 )
QgsSymbolLayerUtils::multiplyImageOpacity( &im, opacity );
QgsImageOperation::multiplyOpacity( im, opacity );

// render image at desired size -- null size means original size
if ( !size.isValid() || size.isNull() || im.size() == size )
Expand Down

0 comments on commit 1e4ad44

Please sign in to comment.