Commit ddaf2265 authored by shadow_walker's avatar shadow_walker
Browse files

refactor: move down getRenderMinMax()

parent adbffa65
......@@ -1610,9 +1610,6 @@ int HdfIO2::write_data(float *data, int image_index, const Region* area,
// convert data to unsigned short, unsigned char...
hsize_t size = (hsize_t)nx*ny*nz;
EMUtil::getRenderMinMax(data, nx, ny, rendermin, rendermax, renderbits, nz);
// printf("RMM %f %f\n",rendermin,rendermax);
hid_t filespace = 0;
hid_t memoryspace = 0;
......@@ -1686,6 +1683,9 @@ int HdfIO2::write_data(float *data, int image_index, const Region* area,
spc2 = spc;
}
EMUtil::getRenderMinMax(data, nx, ny, rendermin, rendermax, renderbits, nz);
// printf("RMM %f %f\n",rendermin,rendermax);
if(dt == EMUtil::EM_COMPRESSED) {
if (renderbits <= 0) dt = EMUtil::EM_FLOAT;
else if (renderbits <= 8) dt = EMUtil::EM_UCHAR;
......
Markdown is supported
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