0

How can I create a grayscale image in Java using 16 bit pixel data stored in a short array?

Mark Elliot
  • 75,278
  • 22
  • 140
  • 160

2 Answers2

2

Consider BufferedImage.TYPE_USHORT_GRAY. There's a tutorial here.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
1

enter image description here Hey may be this helpful to convert your short[] to BufferedImage..it is nicely worked for me try it out. Here pix is my short array.

Community
  • 1
  • 1
Jay Thakkar
  • 699
  • 1
  • 8
  • 13