mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-10-26 07:41:29 +01:00
Calculate bits per pixel from dtype
This commit is contained in:
1 parent
8b26efcebc
commit
be01036dde
1 file changed
+2
-1
@@ -53,7 +53,8 @@ void JFH5Writer::open_run(const string& output_file,
|
||||
current_run_id_ = run_id;
|
||||
image_y_size_ = image_y_size;
|
||||
image_x_size_ = image_x_size;
|
||||
bits_per_pixel_ = bits_per_pixel;
|
||||
// The last digit in the enum value represents the number of bytes/pixel.
|
||||
bits_per_pixel_ = (dtype % 10) * 8;
|
||||
image_n_bytes_ = (image_y_size_ * image_x_size_ * bits_per_pixel_) / 8;
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
|
||||
Reference in new issue
Block a user