G
Guest
Hi All
Cannot seem to access framework.drawing from home, so I'll ask here..
I need to build up a 16-bit-per-pixel grayscale image 'from scratch'. I have a file containing 16-bit unsigned integer data representing a shade of gray for each pixel. The file has (1) a fixed length, and (2) a known number of rows and columns, with one value per row/column pair (i.e., one value per pixel).
I need to load this file into an image object and then manipulate it. I appears the most straightforward (though least efficient) way to to this is to create an image, set its pixel format to ...16bppgrayscale and then do a setpixel for each value in my file. I could then save it off as a bitmap and not have to repeat this operation in the future. But I can't find a way to set a pixel to anything other than Color.FromArgb, which only takes 0-255 for a given channel's value. This won't give me the color depth I need (0-32767)
Any idea how I might do this?
Cannot seem to access framework.drawing from home, so I'll ask here..
I need to build up a 16-bit-per-pixel grayscale image 'from scratch'. I have a file containing 16-bit unsigned integer data representing a shade of gray for each pixel. The file has (1) a fixed length, and (2) a known number of rows and columns, with one value per row/column pair (i.e., one value per pixel).
I need to load this file into an image object and then manipulate it. I appears the most straightforward (though least efficient) way to to this is to create an image, set its pixel format to ...16bppgrayscale and then do a setpixel for each value in my file. I could then save it off as a bitmap and not have to repeat this operation in the future. But I can't find a way to set a pixel to anything other than Color.FromArgb, which only takes 0-255 for a given channel's value. This won't give me the color depth I need (0-32767)
Any idea how I might do this?