Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 1c6ee9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/core/raster/qgsbrightnesscontrastfilter.cpp
Expand Up @@ -38,6 +38,7 @@ QgsRasterInterface * QgsBrightnessContrastFilter::clone() const
QgsDebugMsg( "Entered" );
QgsBrightnessContrastFilter * filter = new QgsBrightnessContrastFilter( 0 );
filter->setBrightness( mBrightness );
filter->setContrast( mContrast );
return filter;
}

Expand Down
8 changes: 6 additions & 2 deletions src/core/raster/qgshuesaturationfilter.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 1c6ee9f

Please sign in to comment.