bugLibreDWG - Bugs: bug #59782, dwgbmp doesn't work in newer DWG...


bug #59782: dwgbmp doesn't work in newer DWG version

Submitter:  Lorenzo Marcantonio <mrclnz>
Submitted:  Wed 30 Dec 2020 10:55:24 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  reini_urban
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Wed 05 Jan 2022 07:23:07 AM UTC, comment #1: 

Thanks, found out by myself also,
and added a partial fix last year
for the primitive BMP 1 format.

Thanks for your code, I'll check.

Reini Urban <reini_urban>
Group administrator
Wed 30 Dec 2020 10:55:24 AM UTC, original submission:  

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.

Lorenzo Marcantonio <mrclnz>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by reini_urban (Posted a comment)
  • -email is unavailable- added by mrclnz (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-05 reini_urban StatusNone Confirmed
        Assigned toNone reini_urban

    Back to the top

    Powered by Savane 3.12