"Varsha Purohit" <[EMAIL PROTECTED]> wrote

>       In one application i want to convert format of ascii file to
> binary file.

That depends entirely on what the ASCII file contains.
Is it a comma separated list of RGB values? Or is it
a uuencode of the binary data? Or something else...

> And using that binary file in a function of PIL i can
> convert it to an image file.

Depending on the formatting you may not need PIL,
but it all depends on what the ASCII contains.

> So i wanted to know how to convert the
> file format in python... is it possible by Numpy ??

You may only need one of the encode/decode libraries
for something like uuencoding or maybe the struct module
will do if its just raw bitmap data.

> other alternative to convert an ascii into an bitmap image directly 
> in
> PIL without Numpy??

Yes you can always do it manually but it all depends
on the format of the data.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to