* is blue, second green, third red and fourth alpha (always 255).
*/
shared_ptr<ARGBFrame>
-MonoPictureFrame::argb_frame (int reduce, float srgb_gamma) const
+MonoPictureFrame::argb_frame (int reduce) const
{
return xyz_to_rgba (
decompress_j2k (const_cast<uint8_t*> (_buffer->RoData()), _buffer->Size(), reduce),
MonoPictureFrame ();
~MonoPictureFrame ();
- boost::shared_ptr<ARGBFrame> argb_frame (int reduce = 0, float srgb_gamma = 2.4) const;
+ boost::shared_ptr<ARGBFrame> argb_frame (int reduce = 0) const;
void rgb_frame (uint16_t* buffer, boost::optional<NoteHandler> note = boost::optional<NoteHandler> ()) const;
uint8_t const * j2k_data () const;
uint8_t* j2k_data ();
check_gamma (shared_ptr<const TransferFunction> tf, int bit_depth, float gamma)
{
double const * lut = tf->lut (bit_depth);
- int const count = pow (2, bit_depth);
+ int const count = rint (pow (2.0, bit_depth));
for (int i = 0; i < count; ++i) {
- BOOST_CHECK_CLOSE (lut[i], pow (double(i) / (count - 1), gamma), 0.001);
+ BOOST_CHECK_CLOSE (lut[i], pow (float(i) / (count - 1), gamma), 0.001);
}
}
check_modified_gamma (shared_ptr<const TransferFunction> tf, int bit_depth, double power, double threshold, double A, double B)
{
double const * lut = tf->lut (bit_depth);
- int const count = pow (2, bit_depth);
+ int const count = rint (pow (2.0, bit_depth));
for (int i = 0; i < count; ++i) {
double const x = double(i) / (count - 1);