Is it possible to embed an image into dwg file, not only as a reference CadRasterImage


Hello Support,
That I need to import an image e.g.PNG or JPG into a dwg file, according to the example, I have instantiad a CadRasterImageDef object and set a locale file as its file name, like : cadRasterImageDef.setFileName(“D:\1.png”);
A CadRasterImage object is created to refer this CadRasterImageDef and added to the cadimage file.
After the cadimage file has been saved, I can see the image imported to the dwg file.

But as a rasterimage, I have only import the reference of the image file, if the “D:\1.png” file have been deleted, I can just see a blank box in the dwg file.

I just want to know that, is it possible to import an image into dwg file, the image should be real embed into the dwg file, as an OLE object or some other thing.




I have observed the requirements shared by you and request you to please visit this documentation link for your kind reference. I hope the shared information will be helpful.


Thanks for your reply.
I have seen the ducumentation, but it just said
“Aspose.CAD for .NET API can load AutoCAD drawings in DWG format and support different entities to work with. A DWG is a binary file that contains vector image data and metadata. There are different entities in a DWG file. The following section describes how can we import image inside DWG file.”

But the follow section is not shown in this document, would you please give some more details? or I just want to known is it possible to embed image permanently within dwg file.




Can you please share that on which link you are having issue so that we may further investigate to help you out.