-
Notifications
You must be signed in to change notification settings - Fork 199
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
Some bitmaps fail in GoVips but work with Vips #300
Comments
Ah, I see that BMP files are handled in a special way by using the bmp go package which is known to not support all versions of BMP foreign.go: vipsLoadFromBuffer is the relevant function. I'm curious why this approach was taken? |
The bitmap library used for this does not support the various bitmap formats in the wild. This is also very confusing behaviour for a user of the pre-v2 version of govips, which was able to handle all the various bmp files Closes davidbyttow#300
I also wonder why. If I need such conversion I could have call the function myself. Since this is advertised as a libvips binding, it should be as close to libvips as possible. To make things worse, the recent changes seems to put yet another hacky layer on top of this: https://github.com/davidbyttow/govips/pull/299/files I presume the Go BMP to PNG conversion was made for backward compatibility? I would much rather deprecate it though. |
I am bringing our image scaling application up to date using govips v2. Thanks for the huge effort to bring the library up to date, it's great!
I have one small issue right now around Bitmap support. I believe that there's something in the bindings which has changed around Bitmap handling. Bitmaps generated in the OS/2 format do not load when they are loaded by govips, instead returning the error
bmp: unsupported BMP image
.These files are definitely loadable by the Vips CLI program for the installation that matches the one used by govips:
I know this is an edge case, but I suspect it's because BMP handling is being done using the standard library? I haven't dug into it yet.
Here are the files in question. This picture was originally obtained through wikipedia I believe, and reencoded to these bitmap formats using ImageMagick Archive.zip
The text was updated successfully, but these errors were encountered: