.NET

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

Reading thumbnail from a 2013 dwg file

403 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: 92
Registered: ‎04-05-2012
Message 2 of 2 (402 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!