.NET

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

Reading thumbnail from a 2013 dwg file

367 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: 71
Registered: ‎04-05-2012
Message 2 of 2 (366 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

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community