Port stb_image to D?
It makes sence to port stb_image to D and thereby get rid of linking to a static library.
- #74 suggests that the library may end up configuration specific and fail to link in some circumstances. Also precompiled libraries are currently only for Windows and Linux, and that makes the engine less portable. D version guarantees full portability
- In fact, we only need image decoders that read from memory. Encoders and filesystem-related functionality in stb_image are unnecessary
- Such port may be included in dlib 2.0 in future.
Obvious disadvantage is that changes from the original C version can't be easily applied to D version. So this is going to be a full-blown fork with serious discrepancies.
If you go that way, Walter Bright has an article on how to minimize the pain of converting C to D, if you haven't seen it already.
Out of curiosity, why did you stop using your own dlib.image?
It turned out that stb is much faster. I haven't compared them in detail, perhaps dlib.image can be improved, so porting stb to D will be a step towards this goal.
Thanks to recent optimization that makes dlib decoders perform not much worse than stb, this has lower priority now.
But stb is still useful to support progressive JPEG, so I'll keep the issue open.
I've decided to close this as impractical and too labor-consuming. I'd rather add progressive JPEG support to dlib (though I have no idea when 🤪)