devongovett / bmp.js Goto Github PK
View Code? Open in Web Editor NEWA BMP decoder in JS for the HTML5 Canvas element
Home Page: http://devongovett.github.com/bmp.js/
A BMP decoder in JS for the HTML5 Canvas element
Home Page: http://devongovett.github.com/bmp.js/
I'm looking to support a broader range of bmp types. I made my own test images using gimp, plus tried the test set from http://entropymine.com/jason/bmpsuite/ .
Chrome can natively read:
16 bit X1 R5 G5 B5 gimp bmp
24 bit gimp bmp
32 bit A8 R8 G8 B8 gimp bmp
It cannot handle:
16 bit R5 G6 B5 gimp bmp
16 bit A1 R5 G5 B5 gimp bmp
32 bit X8 R8 G8 B8
So I was hoping this could expand that support. :D In testing, your test.bmp works fine. However, of my 6 test images, only one displays nearly correctly - the 24 bit gimp bmp. The others all show serious distortion, as well as a loss of the color info. The 24-bit is fine, save for a 1px black line across the top. It is not visible in the canvas, but when you write the canvas out to jpg with toDataURL("image/jpeg"), the line shows up. It does not show up when using the native Chrome support for a 24-bit bmp.
As for the test suite from http://entropymine.com/jason/bmpsuite/ , none of those images show up correctly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.