<div class="gmail_quote">On 3 April 2011 20:33, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 4/3/11 7:25 AM, Fawzi Mohamed wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 2-apr-11, at 10:40, aman bansal wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
i was trying to chalk out a strategy to go for image processing in<br>
D.the closest reference i found was in the implementation of python<br></div>
imaging <a href="http://library.it" target="_blank">library.it</a> <<a href="http://library.it" target="_blank">http://library.it</a>> has modules for imaging,and<div class="im"><br>
input output of jpeg and bmp file formats.the data structures used<br>
also are quite accurate.i would like to ask developers what can be the<br>
possible problems in implementing image i/o in D on the lines of<br>
python imaging library.<br>
</div></blockquote>
<br><div class="im">
As I told you via email<br>
<br>
there are two main things, one is reading/writing several formats, I<br>
would say that you should support at least one standard (simple) format<br>
natively (the simplest would be netpbm format) but then you could rely<br>
on libraries to support more.<br>
Use of external libraries should be discussed with others also, because<br>
one should rely only on libraries that are widely available,<br>
cross-platform and with acceptable licensing.<br>
<br>
About the image processing itself you probably want to have a simple<br>
flat representation of the image (as 2d array), and then be able to<br>
apply several operations on it.<br>
General convolution is probably something you want to have, masked<br>
operation might also be very useful.<br>
Not sure about which other operations you want to support.<br>
In D1 as part of blip I have implemented nearest neighbor convolution,<br>
it could be useful to you.<br>
<br>
Not sure which bit depth you want to support, one can build a wrapper to<br>
access arbitrary bit depth/bitchannel contiguous block of memory as 1d<br>
or 2d array (for example 4channel 12 bit images), this can be useful as<br>
base type for operations with images that might have an extended bit range.<br>
<br>
is this for a GSoC project?<br>
</div></blockquote>
<br>
Yes, that is a GSoC project.<br>
<br>
Aman, you may want to read the posts I wrote with advice to other students before completing your proposal.<br>
<br>
A strong proposal would convince us that you (a) understand your domain rather well, (b) you understand D's specifics enough to define a good API for it, (c) you have studied and absorbed similar endeavors in other languages and frameworks, and (e) you have what it takes to complete the project.<br>

<br>
<br>
Good luck!<br><font color="#888888">
<br>
Andrei<br>
<br>
</font></blockquote></div><br>This about image processing, got me thinking, hows the shader support for D currently? - Interfaceable though C?<div>Because for image processing, thats def. the way to go, at least in my opinion, that is if you want acceptable processing speeds.</div>
<div><br></div><div>And a more specific question; say one wants to blur a picture with Gaussian blur, how would D ranges deal with the 2d array?<br clear="all"><br>-- <br>// Yours sincerely<br>// Emil 'Skeen' Madsen<br>

</div>