Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
retrue opened this issue Feb 24, 2020 · 5 comments

Comments

@retrue
Copy link

retrue commented Feb 24, 2020

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.

@fire-eggs
Copy link
Collaborator

fire-eggs commented Feb 24, 2020

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.

@fire-eggs
Copy link
Collaborator

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.

@unquietwiki
Copy link
Contributor

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

@d2phap
Copy link
Owner

d2phap commented Jul 4, 2020

Yes we should

@d2phap
Copy link
Owner

d2phap commented Oct 11, 2020

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

@d2phap d2phap closed this as completed Oct 11, 2020
@StevenLOL StevenLOL mentioned this issue Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants