From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

After loading 24-bit depth image max pixel value is 255

Solved!
Go to solution

Hello,

 

Here is a small example where 24-bit depth image is loaded as Grayscale 16-bit.

The maximum pixel value is 255, but not 65535.

Loading as Grayscale (SGL), i.e. float, 32bit produce the same result.

2 questions:

  • is there a workaround allowing to load 24-depth image as 16-bit
  • is there some option in "google image search" allowing to find 16-bit images

Thanks

 

load_16bit_image.JPG

0 Kudos
Message 1 of 5
(6,825 Views)

Hi Pavel,

 

is this a "standard" JPEG you try to load? A JPEG with just 8bit color information?

When there is only information of 8 bit color entries you can not magically blow them up to U16 or SGL values…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(6,814 Views)

Hi GerdW

 

Here is file properties of the image that I've found with Google (specifying BW option).

If I properly understood your comment, for BW jpeg images only 8 bits are significant?

If it's the case, my 2nd question is probably more relevant, i.e. how find true 16-bit depth BW image on web without having to download each image and check its properties.

 

image_properties.JPG

 

0 Kudos
Message 3 of 5
(6,806 Views)
Solution
Accepted by topic author Pavel_47

Hi Pavel,

 

If I properly understood your comment, for BW jpeg images only 8 bits are significant?

24bit = 3×8bit (RGB)…

 

how find true 16-bit depth BW image on web without having to download each image and check its properties.

I would search for "16 bit grayscale images". And I would use other image formats like PNG or TIFF instead of JPG…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(6,800 Views)

Ok, thanks

0 Kudos
Message 5 of 5
(6,794 Views)