# NormalizeMinMax and high bit depth images

**URL:** <https://forum.commonvisionblox.com/t/normalizeminmax-and-high-bit-depth-images/1903>\
**Category:** .Net API\
**Created:** [January 30, 2023, 6:23pm UTC](https://forum.commonvisionblox.com/t/normalizeminmax-and-high-bit-depth-images/1903 "2023-01-30T18:23:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BitSmith](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/bitsmith/32/1093_2.png) [@BitSmith](https://forum.commonvisionblox.com/u/BitSmith)\
**Post date:** [January 30, 2023, 6:23pm UTC](https://forum.commonvisionblox.com/t/normalizeminmax-and-high-bit-depth-images/1903/1 "2023-01-30T18:23:25Z")

</div>

Hello,

I am trying to use NormalizeMinMax with a high bit depth image (16 Bits).

I am not receiving an exception, but the returned image is just noise.

This is my code  
var bitDepth = image.Planes[0].DataType.BitsPerPixel;  
var targetMax = Math.Pow(2, bitDepth);  
var newImage = image .NormalizeMinMax( 0, targetMax-1 );

```
        image.Save(@"d:\source.tif");
        newImage.Save(@"d:\enhanced.tif");

```

Should this work with 16 images?  
Source

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/2X/e/e81e8103adbc7f830521b31e0ee48a8b8f02b05b.png)  
Result  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/2X/2/2109963f1a3d22167ddd9391b39656bfed2f909d.jpeg)
