diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index be1cd0e..7ea2c01 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -212,11 +212,11 @@ void ImageViewer::analyzeImage() { renewLogging(); for(int x=0; xwidth(); x++) { for(int y=0; yheight(); y++) { - int r,g,b; - QColor color = QColor::fromRgb(image->pixel(x, y)); - color.getRgb(&r,&g,&b); - int intensity = calcIntensity(r, g, b); - grayscale_absolute_histogramm[intensity] += 1; + int r,g,b; + QColor color = QColor::fromRgb(image->pixel(x, y)); + color.getRgb(&r,&g,&b); + int intensity = calcIntensity(r, g, b); + grayscale_absolute_histogramm[intensity] += 1; } } @@ -553,8 +553,8 @@ void ImageViewer::open() { return; } else { if(original_image!=NULL) { - delete original_image; - original_image = NULL; + delete original_image; + original_image = NULL; } original_image = new QImage(fileName); }