Skip to content
Permalink
Browse files

Fix contrast, grayscale and colorize settings not applying to exporte…

…d raster layers
  • Loading branch information
nyalldawson committed Apr 3, 2013
1 parent 8e7ffd7 commit 3a4aa8f610823f0098355c2ed14594ed6e12abeb
Showing with 7 additions and 2 deletions.
  1. +1 −0 src/core/raster/qgsbrightnesscontrastfilter.cpp
  2. +6 −2 src/core/raster/qgshuesaturationfilter.cpp
@@ -38,6 +38,7 @@ QgsRasterInterface * QgsBrightnessContrastFilter::clone() const
QgsDebugMsg( "Entered" );
QgsBrightnessContrastFilter * filter = new QgsBrightnessContrastFilter( 0 );
filter->setBrightness( mBrightness );
filter->setContrast( mContrast );
return filter;
}

@@ -41,6 +41,10 @@ QgsRasterInterface * QgsHueSaturationFilter::clone() const
QgsDebugMsg( "Entered hue/saturation filter" );
QgsHueSaturationFilter * filter = new QgsHueSaturationFilter( 0 );
filter->setSaturation( mSaturation );
filter->setGrayscaleMode( mGrayscaleMode );
filter->setColorizeOn( mColorizeOn );
filter->setColorizeColor( mColorizeColor );
filter->setColorizeStrength( mColorizeStrength );
return filter;
}

@@ -361,8 +365,8 @@ void QgsHueSaturationFilter::readXML( const QDomElement& filterElem )

mColorizeOn = ( bool )filterElem.attribute( "colorizeOn", "0" ).toInt();
int mColorizeRed = filterElem.attribute( "colorizeRed", "255" ).toInt();
int mColorizeGreen = filterElem.attribute( "colorizeGreen", "0" ).toInt();
int mColorizeBlue = filterElem.attribute( "colorizeBlue", "0" ).toInt();
int mColorizeGreen = filterElem.attribute( "colorizeGreen", "128" ).toInt();
int mColorizeBlue = filterElem.attribute( "colorizeBlue", "128" ).toInt();
setColorizeColor( QColor::fromRgb( mColorizeRed, mColorizeGreen, mColorizeBlue ) );
mColorizeStrength = filterElem.attribute( "colorizeStrength", "100" ).toInt();

0 comments on commit 3a4aa8f

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