Commit 723b7560 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Autostretch fixes

parent b2c8887e
......@@ -1470,6 +1470,9 @@ void FITSData::applyFilter(FITSScale type, uint8_t *image, float *min, float *ma
{
dataMin = stats.mean[0] - stats.stddev[0];
dataMax = stats.mean[0] + stats.stddev[0] * 3;
//dataMin = stats.min[0] + stats.stddev[0];
//dataMax = stats.mean[0]*2;
//dataMin = 0;
//dataMax = pow(2, stats.bitpix) - 1;
}
......
......@@ -493,6 +493,9 @@ bool FITSView::loadFITS (const QString &inFilename , bool silent)
delete (image_data);
image_data = NULL;
filterStack.clear();
filterStack.push(FITS_NONE);
image_data = new FITSData(mode);
if (setBayerParams)
......@@ -677,8 +680,8 @@ template<typename T> int FITSView::rescale(FITSZoom type)
for (int i = 0; i < image_width; i++)
{
val = buffer[j * image_width + i];
scanLine[i]= (val * bscale + bzero);
val = buffer[j * image_width + i] * bscale + bzero;
scanLine[i]= qBound(0.0, val, 255.0);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment