I want to develop an appication which can converts image to text format(some Ascii format) and text to image format. I want this because i need to decrease the size of the image file. Any suggestion plz. Thanks in advance, Ibrahim.
When you say that you wish to reduce the size of the image do you mean that you wish to reduce the image file size or reduce the dimensions that it takes up on the display?
If you wish to reduce the file size then converting it to an ASCII file won't help. Instead you need to compress it. (Say by converting bitmap to jpeg).
Edit
Based on your comment. I would suggest that you look at JpegBitmapDecoder and JpegBitmapEncoder classes for decoding the jpeg file into a bitmap and then encoding the bitmap with different valkues from the start.
Also look here for more information including how to override the default compression of 75% More info
Actually, when you convert an image to text, you will increase the size, not decrease it! The reason for this is simple: if you store an image in binary format, you'll have the full value spectrum of a byte available to store your image in. When you use a text format, the value spectrum is limited to 26 uppercase characters, 26 lowercase characters, 10 digits and a bunch of special characters, but it will be far less than the 256 values that you have in binary mode.
Converting binary to text and back again is often done by using UUEncoding. It's an encoding system that still manages to generate a reasonable small text-stream and it's a good standard that is used in many places already, with plenty of libraries for dozens of languages. UUEncoding uses 64 different characters, thus every 3 bytes of binary data gets translated to 4 characters. (Increase with one-third.)
To make your binary images smaller, use a different image format like JPG or PNG. JPG is advised for photo's where some loss of quality isn't a big problem. PNG is often used when image quality must be high or when your image has some transparent parts. If your original image is a BMP then converting it to PNG and then UUEncoding the PNG file will result in a considerable shrinking in filesize. (But that's because of the PNG compression, not the encoding.)
If you are wanting to recognise letters in your image and convert that to text, how about one of the OCR libraries?