1

How can I convert image data of 16 bit integer type to 8-bit integer type using openimageio c++ api? Is this possible to do?

I have tried using convert_types() present in imageio.h but the result is not proper as I would have passed wrong 'n' value. What parameter 'n' signifies convert_types()? what value should be passed?

Revanth
  • 59
  • 8
  • By giving n = width * height * numberOf Channels, I am able to convert image data of 16 bit integer type to 8-bit integer type. Is this the correct way to do ? – Revanth Jul 09 '19 at 13:11
  • 1
    Yes. if target data should contain 8 bit channel per pixel then n = w * h * 1 – Tajuddin Khandaker Nov 26 '19 at 09:43

0 Answers0