Embed a raster image

Discussion in 'AutoCAD' started by borisz, Apr 26, 2004.

  1. borisz

    borisz Guest

    Is it possible to embed a raster image into an AutoCAD drawing (I do not wish to distribute bmp files along with the dwg file). I also tried to paste an image into an AutoCAD drawing but could not find a way to programmatically paste it at a specified location. I even tried to move the inserted OLE object but to no avail.
     
    borisz, Apr 26, 2004
    #1
  2. use acaddocument.modelspace.addraster (filename....


    cheers,
    Krishnaprasad
     
    krishnaprasad, May 1, 2004
    #2
  3. As far as I know, it's not possible to embed a raster image or any other
    type of XRef into a drawing, still keeping it's original functionality.
    There is, though, a very complex solution that embeds raster's binary stream
    into the ACAD Dictionary structure, displaying it later via ObjectARX-coded
    mechanism. But it's just too complex to code if you're not _very_ familiar
    with C/ObjectARX.

    Regards,
    Maksim Sestic

    wish to distribute bmp files along with the dwg file). I also tried to paste
    an image into an AutoCAD drawing but could not find a way to
    programmatically paste it at a specified location. I even tried to move the
    inserted OLE object but to no avail.
     
    Maksim Sestic, May 2, 2004
    #3
  4. borisz

    ericju Guest

    Doesn't the DXF file format contain a hex listing of the included raster images? It's funky, but I've done things like this before. When I was unable to get a handle to something from within Acad, write the file to a DXF, read the file and find the stuff you want, programmatically input it into the drawing.

    In this case it seems like you could write the DXF, find the raster data, write a smaller DXF that just included your raster data, import it.
     
    ericju, Sep 13, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.