PDA

View Full Version : Image text formatting



aligahk06
10-28-2009, 05:27 AM
Dear Valuable coders,

I am attaching an image format file for your reference.Is there any way to align the text inside an image format. I mean splitting the image and aligning text and again make as it is ?

This image is pasted into a word file .

Please assist ?

Rgds,
Aligahk06

macropod
10-28-2009, 03:51 PM
Hi Aligahk06,

The simple answer is: no. In any event, there is no text in a bitmap image, only coloured pixels which you may be able to read as text. Of course, if you process the image through an OCR program, you might be able to recover the text it represents (perhaps even with colour). Alternatively, you could simply copy & paste the original source as text instead of as an image.

Finally, the layout in your image is one that's provided by sites such as this to aid code readability, so 'aligning' would reduce that.

fumei
10-29-2009, 12:12 PM
Good answer.

Aligahk06, I want to reiterate what macropod stated. It is important to understand that an image does not have text. It may look like text, and an OCR application can do a fairly good job of interpreting things to get text, but an image does not actually have text. They are arrays of pixels set at various values (RGB and luminosity). Nothing more.

In fact, they are not REALLY even that. They are essentially text files that tell the operating system (or more correctly the application reading them) to display pixels at such and such settings. Which is why you can actually bring a JPG file into a text reader (say, Wordpad) and see.......

ÿØÿàÿÚÿÚÝøŠÈìÝ©Ç

blah blah blah etc. etc. etc.