- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
How to convert the PXCImage in PIXEL_FORMAT_RGB32 to PXCImage in PIXEL_FORMAT_RGB24 ??
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page