This transforms the legacy code into a more standardized image processing API. It's still far from great, but the old code was hilariously bad... in fact, it must be one of the first things I ever wrote in JavaScript.
Improvements in this PR:
Removed a lot of redundant code and comments
Added preliminary PNG and JPEG support (should probably use a native module later, like sharp)
Added a basic test suite (very light in terms of PNG and JPEG, since these are handled by external libraries)
Removed bmp-js, since it didn't work with some of the textures I needed to decode and the builtin decoder mostly did the job
Added support for padded rows and 24-bit images to the builtin BMP decoder
Streamlined image decoding to use the standardized Decoding API, so that requests are queried against the resource cache
While this should probably be split into several (many) individual PRs, it's one large rewrite/refactor so I guess it doesn't matter.
This transforms the legacy code into a more standardized image processing API. It's still far from great, but the old code was hilariously bad... in fact, it must be one of the first things I ever wrote in JavaScript.
Improvements in this PR:
bmp-js
, since it didn't work with some of the textures I needed to decode and the builtin decoder mostly did the jobWhile this should probably be split into several (many) individual PRs, it's one large rewrite/refactor so I guess it doesn't matter.