.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reading thumbnail from a 2013 dwg file

1 REPLY 1
Reply
Message 1 of 2
FRFR1426
813 Views, 1 Reply

Reading thumbnail from a 2013 dwg file

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?

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
Tags (2)
1 REPLY 1
Message 2 of 2
FRFR1426
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

 

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost