Handling PGM graphic files in Delphi

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit

Hello Delphi World !
 Any one that can help !  I have to do some image processing on Image
files of type PGM. Actually it is my class
 project to read this type of file and try to identify image in this
picture. Images would be hand written characters in different sizes. I
have to do edge detection and identify what these chars are by comparing
them with modals that I will create to recognize these chars. Sounds fun
to you professional guys :-(  not for me !!!
I am free to use C or any other language to do this. Now as I have been
working in Delphi for some time now I hate to force myself to write C
code. I was thinking to ask you guys who have experience in this area
if  I can use Delphi for this job. I am sure there will be some support
in this regard. How can I read pixels from this type of images into
arrays and then apply statistical analysis techniques on them to do what
ever I have to do.
Please help me here and If you can give any example that would be great
I appreciate any help and thank you in advance.


Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Hayder Mir
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Hayder Mir
n:              Mir;Hayder
org:            Department of Communication and Business Services
email;internet: m...@dcs.umd.edu
title:          Programmer
tel;work:       301-405-4431
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
end:            vcard