hi,
How to convert the PXCImage in PIXEL_FORMAT_RGB32 to PXCImage in PIXEL_FORMAT_RGB24 ??
Link Copied
I haven't tried this myself but from looking at the docs, you may have some luck using the CopyImage method. So if you have a 32 bit image (oldImage), you could try creating a new 24 bit image and copying the former to the latter. Something like:
PXCMImage.ImageInfo iinfo=new PXCMImage.ImageInfo() {
width=oldImage.Width, height=oldImage.Height, format=PXCMImage.ColorFormat.COLOR_FORMAT_RGB24
};
PXCMImage newImage=session.CreateImage(iinfo);
if(newImage.Copy(oldImage) != PXCMStatus.STATUS_PARAM_UNSUPPORTED)
//The function returned successfully.
else
//Failed to copy image due to unsupported pixel format conversion.
Again, no idea if this will work, but worth a try maybe?
For more complete information about compiler optimizations, see our Optimization Notice.