dxfjs / writer

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

AutoCAD ignore inserted image #176

Open menshykovAS opened 6 months ago

menshykovAS commented 6 months 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 months 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.