.NET

.NET

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

Reading thumbnail from a 2013 dwg file

405 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: 98
Registered: ‎04-05-2012
Message 2 of 2 (404 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

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.