Hi all,

 

Just thought I’d mention the headway I’m making with this Image Manipulation ndll.  Theres still lots of work to be done, but the Cimg library is incredibly powerful, and coupled with a standard install of ImageMagick, you have a great cross platform image manipulation suite which I’m easily porting to Neko / haXe.  Here’s an example Neko script that modifies an image on my drive

 

var img = load("sample.jpg");   // create a new image object from a file

//crop(img, 50, 50, 200, 200);    // crop the image

resize(img, 160, 120);    // resize the image

var clr = simplecolor(255, 0, 255);    // create a new 3 value color (9 color matrix also supported)

var i=0;

while (i<100)

{

            plot(img, 20, i, clr, 100);    // plot some pixels in my simplecolor

            i+=1;

}

//quantify(img, 4);    // quantify my image

//rotate(img, 45);    // rotate my image

var clr = simplecolor(255, 0, 0);    // select new color

text(img, "this is me", 10, 10, clr);    // write text to the image

save(img, "smaller.gif");    // save as new image (note saving to gif when loaded as jpeg)

show(img, "Hello World");    // show image in a window

destroy(img);    // garbage collect

 

 

I still need idea’s on what to include, though the current list is enough to keep me busy for a good week J

 

Regards,

Lee

 

 

 

 

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to