Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
m-schuetz committed Jul 20, 2023
1 parent 7207c16 commit bf4046e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/CsvWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ vector<function<void(int64_t)>> createAttributeHandlers(shared_ptr<ofstream> str

memcpy(&rgb, source->data_u8 + index * attribute->size, attribute->size);

*stream << rgb[0] << ", " << rgb[1] << ", " << rgb[2];
uint32_t R = rgb[0] > 255 ? rgb[0] / 256 : rgb[0];
uint32_t G = rgb[1] > 255 ? rgb[1] / 256 : rgb[1];
uint32_t B = rgb[2] > 255 ? rgb[2] / 256 : rgb[2];

*stream << R << ", " << G << ", " << B;
}else{
*stream << "0, 0, 0";
}
Expand Down

0 comments on commit bf4046e

Please sign in to comment.