diff options
Diffstat (limited to 'digikam/imageplugins/infrared/infrared.cpp')
-rw-r--r-- | digikam/imageplugins/infrared/infrared.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/digikam/imageplugins/infrared/infrared.cpp b/digikam/imageplugins/infrared/infrared.cpp index dcf4c2f3..f0e361ba 100644 --- a/digikam/imageplugins/infrared/infrared.cpp +++ b/digikam/imageplugins/infrared/infrared.cpp @@ -27,9 +27,9 @@ #include <cmath> #include <cstdlib> -// Qt includes. +// TQt includes. -#include <qdatetime.h> +#include <tqdatetime.h> // Local includes. @@ -44,8 +44,8 @@ namespace DigikamInfraredImagesPlugin { -Infrared::Infrared(Digikam::DImg *orgImage, QObject *parent, int sensibility, bool grain) - : Digikam::DImgThreadedFilter(orgImage, parent, "Infrared") +Infrared::Infrared(Digikam::DImg *orgImage, TQObject *tqparent, int sensibility, bool grain) + : Digikam::DImgThreadedFilter(orgImage, tqparent, "Infrared") { m_sensibility = sensibility; m_grain = grain; @@ -110,11 +110,11 @@ void Infrared::infraredImage(Digikam::DImg *orgImage, int Sensibility, bool Grai uchar* pBWBits = 0; // Black and White conversion. uchar* pBWBlurBits = 0; // Black and White with blur. uchar* pGrainBits = 0; // Grain blured without curves adjustment. - uchar* pMaskBits = 0; // Grain mask with curves adjustment. + uchar* pMaskBits = 0; // Grain tqmask with curves adjustment. uchar* pOverlayBits = 0; // Overlay to merge with original converted in gray scale. - uchar* pOutBits = m_destImage.bits(); // Destination image with merged grain mask and original. + uchar* pOutBits = m_destImage.bits(); // Destination image with merged grain tqmask and original. - Digikam::DColor bwData, bwBlurData, grainData, maskData, overData, outData; + Digikam::DColor bwData, bwBlurData, grainData, tqmaskData, overData, outData; //------------------------------------------ // 1 - Create GrayScale green boosted image. @@ -153,17 +153,17 @@ void Infrared::infraredImage(Digikam::DImg *orgImage, int Sensibility, bool Grai } //----------------------------------------------------------------- - // 2 - Create Gaussian blured averlay mask with grain if necessary. + // 2 - Create Gaussian blured averlay tqmask with grain if necessary. //----------------------------------------------------------------- if (Grain) { - // Create gray grain mask. + // Create gray grain tqmask. - QDateTime dt = QDateTime::currentDateTime(); - QDateTime Y2000( QDate(2000, 1, 1), QTime(0, 0, 0) ); + TQDateTime dt = TQDateTime::tqcurrentDateTime(); + TQDateTime Y2000( TQDate(2000, 1, 1), TQTime(0, 0, 0) ); uint seed = ((uint) dt.secsTo(Y2000)); pGrainBits = new uchar[numBytes]; // Grain blured without curves adjustment. @@ -198,7 +198,7 @@ void Infrared::infraredImage(Digikam::DImg *orgImage, int Sensibility, bool Grai postProgress( progress ); } - // Smooth grain mask using gaussian blur. + // Smooth grain tqmask using gaussian blur. Digikam::DImgImageFilters().gaussianBlurImage(pGrainBits, Width, Height, sixteenBit, 1); @@ -223,20 +223,20 @@ void Infrared::infraredImage(Digikam::DImg *orgImage, int Sensibility, bool Grai if (Grain) { Digikam::ImageCurves *grainCurves = new Digikam::ImageCurves(sixteenBit); - pMaskBits = new uchar[numBytes]; // Grain mask with curves adjustment. + pMaskBits = new uchar[numBytes]; // Grain tqmask with curves adjustment. // We modify only global luminosity of the grain. if (sixteenBit) { - grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 0, QPoint(0, 0)); - grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 8, QPoint(32768, 32768)); - grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 16, QPoint(65535, 0)); + grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 0, TQPoint(0, 0)); + grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 8, TQPoint(32768, 32768)); + grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 16, TQPoint(65535, 0)); } else { - grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 0, QPoint(0, 0)); - grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 8, QPoint(128, 128)); - grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 16, QPoint(255, 0)); + grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 0, TQPoint(0, 0)); + grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 8, TQPoint(128, 128)); + grainCurves->setCurvePoint(Digikam::ImageHistogram::ValueChannel, 16, TQPoint(255, 0)); } // Calculate curves and lut to apply on grain. @@ -268,7 +268,7 @@ void Infrared::infraredImage(Digikam::DImg *orgImage, int Sensibility, bool Grai Digikam::DColorComposer *composer = Digikam::DColorComposer::getComposer(Digikam::DColorComposer::PorterDuffNone); int alpha; - int Shade = 52; // This value control the shading pixel effect between original image and grain mask. + int Shade = 52; // This value control the shading pixel effect between original image and grain tqmask. if (sixteenBit) Shade = (Shade + 1) * 256 - 1; @@ -280,15 +280,15 @@ void Infrared::infraredImage(Digikam::DImg *orgImage, int Sensibility, bool Grai // read color from orig image bwBlurData.setColor(pBWBlurBits + offset, sixteenBit); - // read color from mask - maskData.setColor(pMaskBits + offset, sixteenBit); + // read color from tqmask + tqmaskData.setColor(pMaskBits + offset, sixteenBit); // set shade as alpha value - it will be used as source alpha when blending - maskData.setAlpha(Shade); + tqmaskData.setAlpha(Shade); // compose, write result to blendData. // Preserve alpha, do not blend it (taken from old algorithm - correct?) alpha = bwBlurData.alpha(); - composer->compose(bwBlurData, maskData); + composer->compose(bwBlurData, tqmaskData); bwBlurData.setAlpha(alpha); // write to destination @@ -317,7 +317,7 @@ void Infrared::infraredImage(Digikam::DImg *orgImage, int Sensibility, bool Grai } //------------------------------------------ - // 3 - Merge Grayscale image & overlay mask. + // 3 - Merge Grayscale image & overlay tqmask. //------------------------------------------ // Merge overlay and gray scale image using 'Overlay' Gimp method for increase the highlight. |