Advertisement

How to load a texture in lab color space for Direct3D 9

Started by July 07, 2018 09:31 AM
1 comment, last by cgrant 6 years, 7 months ago

I want to load a texture in lab color space for meanshift clustering operations. I am looking into a parameter of D3DFMT..., but the image must stay in the original RGBA format.

Any ideas?

Thanks

Jack

If you are expecting a LAB format in any API you are going to be out of luck. Just because the format says RGB/RGBA there is not constraint on what the actual data represent. If the LAB data you have can be quantized into any of the support texture format, then there is nothing stopping you from using that texture format to upload your texture. The caveat being that D3D has not concept of LAB textures so you will have to manually handle the interpretation of the texture values. So it can be done, you just have to convert/process the values after you sample the texture.

This topic is closed to new replies.

Advertisement