From d01923fd78e1501638c22c7d731b053975da8d77 Mon Sep 17 00:00:00 2001 From: Ingo Date: Sun, 18 Jan 2015 14:48:32 +0100 Subject: [PATCH] Fixed a crash using NR auto chroma mode in combination with rotation/distortion correction, no Issue --- rtengine/dcrop.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 121b347c9..6c4beaa4d 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -255,9 +255,11 @@ void Crop::update (int todo) { //setCropSizes (centerTile_X[poscenterX], centerTile_Y[poscenterY], trafw*skip,trafh*skip , skip, true); // we only need image reduced to 1/4 here - Imagefloat *provicalc = new Imagefloat ((cropw+1)/2, (croph+1)/2);//for denoise curves - for(int ii=0;iigetWidth(); + int H = origCrop->getHeight(); + Imagefloat *provicalc = new Imagefloat ((W+1)/2, (H+1)/2);//for denoise curves + for(int ii=0;iir(ii>>1,jj>>1) = origCrop->r(ii,jj); provicalc->g(ii>>1,jj>>1) = origCrop->g(ii,jj); provicalc->b(ii>>1,jj>>1) = origCrop->b(ii,jj); @@ -492,9 +494,11 @@ void Crop::update (int todo) { if((noiseLCurve || noiseCCurve ) && skip==1 && denoiseParams.enabled) {//only allocate memory if enabled and skip // we only need image reduced to 1/4 here - calclum = new Imagefloat ((cropw+1)/2, (croph+1)/2);//for denoise curves - for(int ii=0;iigetWidth(); + int H = origCrop->getHeight(); + calclum = new Imagefloat ((W+1)/2, (H+1)/2);//for denoise curves + for(int ii=0;iir(ii>>1,jj>>1) = origCrop->r(ii,jj); calclum->g(ii>>1,jj>>1) = origCrop->g(ii,jj); calclum->b(ii>>1,jj>>1) = origCrop->b(ii,jj);