URL: <https://savannah.gnu.org/bugs/?59782>
Summary: dwgbmp doesn't work in newer DWG version Project: LibreDWG Submitted by: mrclnz Submitted on: Wed 30 Dec 2020 10:55:24 AM UTC Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: More than a bug report this could be a contribution. I did a thumbnail provider for dwg files, somewhat inspired by dwgbmp. dwgbmp doesn't work on many post R2000 dwg files, for some different reasons: - Maybe it can't find the preview block - It only supports type 1 (BMP) DIBs in 256 color paletted mode - Newer formats actually have type 6 previews (not documented in the reverse engineered format), which are simply PNG files stored in the preview block. I solved the first issue simply by looking for the 16-byte signature (not elegant but it works); the second issue would need interpreting the DIB header but I've only seen a couple of file around with a different DIB format. The third issue is simply handled writing the block as-is as a png file. I use it with ARES Commander (up to R2018 format) and it seems to work fine. The tool is here: https://github.com/mrclnz/dwgthumb It's GPL3 so there shouldn't be any problem Thanks for the very good work. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?59782> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/