Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert System__ComObject to an image?

Tags:

c#

com-interop

I'm using DSOFile to get the summary properties from some Crystal Reports report files. SummaryProperties.Thumbnail returns an object and I need to convert the object to an image so I can display it as a preview on my form. I have tried casting it to a System.Drawing.Image but I get an error "ImageConverter cannot convert from System.__ComObject."

like image 496
jac Avatar asked Apr 08 '26 14:04

jac


1 Answers

It would be a COM interface for images, IPicture or IPictureDisp, probably. You could use the AxHost.GetPictureFromIPicture or GetPictureFromIPictureDisp static method to make the conversion.

like image 184
Hans Passant Avatar answered Apr 12 '26 03:04

Hans Passant