On Friday, 1 July 2016 at 21:18:28 UTC, Vladimir Panteleev wrote:


Generally most use cases for using an image library can be divided into:

1. You have full control over the images being loaded. This is the case when you're loading graphical assets for your application which otherwise doesn't concern itself for graphical work.

2. You're writing an image editor, or some other program that processes images out of your control, i.e. supplied by the user.

Generally the first case is by far the most common one (think GUI applications, video games...). In this case, since you already know or have control over the format of your images, there is no reason to burden your application with performance-killing abstraction layers - you should load and work in the format that your images already are.

Additionally, if necessary, it is easy to build such a runtime abstraction layer over a templated library by creating an algebraic type from only the set of formats that you want to support. Doing the inverse is impossible.

In case anyone from this thread haven't seen it, I have my own image library, which I wrote about here: https://blog.thecybershadow.net/2014/03/21/functional-image-processing-in-d/

Hi Vladimir, thanks for your response and explanation.

Also wanted to take the opportunity to say that the blog post about your library was one of the biggest motivations for me to pursue D for computer vision. Thanks a tone for your effort! :)

Cheers,
Relja

Reply via email to