ImageGlass doesn't open an incorrect bmp file that any other image software opens

Created on 24 Feb 2020  路  5Comments  路  Source: d2phap/ImageGlass

System information:

  • Windows OS version: Windows 10.
  • ImageGlass version: 7.5.1.1

To Reproduce

Steps to reproduce the behavior:

  1. Unzip the attached zip file and open with ImageGlass the bmp file it contains. You will get the following error message:

ImageGlass cannot open this picture because the file appears to be damaged, corrupted or not supported.
ImageGlass: Reference to object no stablished as instance of that object.

Actual behavior:

The attached file
Fractal_200224145800.zip
is open correctly by any other program that I have tried: Mspaint, Gimp, the Windows file explorer as thumbnail, Firefox, MPC-HC (a videoplayer), etc, except ImageGlass.

Expected behavior:

The bmp file should open with ImageGlass despite the error.

Screenshots:

Anotaci贸n 2020-02-24 151449

Additional context:

The bmp file included in the attached zip file has been generated by a small fractal program called Fractal2 https://github.com/Kosalos/Fractal2New (This program is a port from another program of the same author for MacOS. It is compiled using VS2019).
Fractal2 saves the images in bmp format, but there is a bug somewhere and the generated bmp file is 12 pixels wider than it should and this mistake appears as a thin black band on the right side of the image.

馃悶 bug 馃憣 ready

All 5 comments

Wow! Thank you for the sample file!

Embarrassingly, the image opens fine in the thumbbar!

The library we use to load images may be picky about what it determines to be "incorrect" images. In this case, the library is actually complaining that "the image length and filesize do not match". That would be consistent with your statement that the bmp is "12 pixels wider than it should be".

Since the image can be viewed in the thumbbar, we presumably have a workaround we can use. Also, we seem to have done something so the "real" error has been lost.

Similar issue as #386. In that case, ImageMagick / Magick.NET was tweaked to allow filesize discrepancy of 4 pixels.

We need to ask if we can force an image load and ignore errors, or consider using GDI+ as a workaround in these cases.

@fire-eggs per #811 when I try this, I get length and filesize do not match (filename) @ error/bmp.c/ReadBMPImage/846; this is using 7.20.0.1 of the library. Maybe a bug needs to be filed at https://github.com/dlemstra/Magick.NET ?

Yes we should

Fixed this error in the latest build of IG Moon https://imageglass.org/moon

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xmha97 picture xmha97  路  4Comments

motazalnuweiri picture motazalnuweiri  路  5Comments

Unknow0059 picture Unknow0059  路  4Comments

BowChow picture BowChow  路  6Comments

jtagcat picture jtagcat  路  5Comments