.NET

.NET

Reply
Distinguished Contributor
109 Posts
7 Kudos
Registered: ‎04-05-2012
Post 1 of 2

Reading thumbnail from a 2013 dwg file

410 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?

Distinguished Contributor
109 Posts
7 Kudos
Registered: ‎04-05-2012
Post 2 of 2

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 interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!