Skip to content
Permalink
Browse files

Use image operation's multiplyOpacity in image cache

  • Loading branch information
nirvn committed Dec 5, 2018
1 parent c642533 commit 1e4ad4460f449ecbd3e74f058857e6f0d92c853d
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/qgsimagecache.cpp
@@ -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>
@@ -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 )

0 comments on commit 1e4ad44

Please sign in to comment.
You can’t perform that action at this time.