.NET

Reply
Valued Contributor
FRFR1426
Posts: 76
Registered: ‎04-05-2012
Message 1 of 2 (396 Views)

Reading thumbnail from a 2013 dwg file

396 Views, 1 Replies
05-09-2012 06:44 AM

I know how to read the BMP thumbnail (there are some code here: http://forums.autodesk.com/t5/NET/Another-DWGThumbnail-post/m-p/3007970/highlight/true#M23445), but in 2013, the BMP has been replaced by a PNG. The type seems to be 6 instead of 2 (BMP), but I don't know how the PNG is stored (I've not made further investigation).

 

Does anyone here have the code or some information about it?

Valued Contributor
FRFR1426
Posts: 76
Registered: ‎04-05-2012
Message 2 of 2 (395 Views)

Re: Reading thumbnail from a 2013 dwg file

05-09-2012 06:58 AM in reply to: FRFR1426

I've found it:

 

fs.Seek(udtRec.lngStart, SeekOrigin.Begin)
Using ms As New MemoryStream
    fs.CopyTo(ms, udtRec.lngStart)
    img = Image.FromStream(ms)
End Using

 

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.