For such a simple task, I would use MATLAB. http://www.mathworks.com/products/matlab/ However, if you have to do generic programming in addition to this, I would use Python with the libraries ImageMagick or Python Image Library (PIL). Just search for them and you'll have all the examples you need.