dxfjs / writer

A JavaScript dxf generator written in TypeScript.
https://dxf.vercel.app
MIT License
79 stars 17 forks source link

AutoCAD ignore inserted image #176

Open menshykovAS opened 1 month ago

menshykovAS commented 1 month ago

Hello, i have a problem when i use : let imgRef = this.dxf.addImage('map.png', 'map.png',{x:10,y:10,z:0},800,800,1,0) I also try: let imgRef = this.dxf.addImage('.\\map.png', 'map.png',{x:10,y:10,z:0},800,800,1,0) But when i try to open file in Autodesk TrueView get this in autodesk log: image Please help

alessiocancian commented 5 days ago

Try with classVersion: 0, it worked for me.

dxf.addImage('map.png', 'map', { x: 10, y: 10, z: 0 }, 800, 800, 1, 0, {
   classVersion: 0,
})

I don't know what it means but I found it in a dxf file with a working image and it turned out that adding it to the file exported with this library fixed the image.