Skip to content
Permalink
Browse files

Merge pull request #501 from nyalldawson/color_control

Fix contrast, grayscale and colorize settings not applying to exported raster layers
  • Loading branch information
alexbruy committed Apr 4, 2013
2 parents cbd257d + 3a4aa8f commit 1c6ee9f65002b8550a66b9c9e65c2b997ac7cb05
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 1c6ee9f

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