Hi,
I had a question. Actually this is a first question from me at the site.

We all know that how Text and Numbers are stored in the computer. Numbers and for Text use ASCII codes and binary codes. So how are pictures stored. Because Every alphabet has its own binary ASCII code but what about pictures? My question is written below.....


Question: Describe briefly how pictures can be stored in computer and how this enables manipulation of it?

thanks...

Recommended Answers

All 4 Replies

Thanks for replying. But i didn't get the answer that i needed. LIKE A = 100 0001 (binary code). Till i know, each binary code has its own binary code. so whats the binary code like for a normal picture. I mean what color has what binary code.

An image is just a two dimensional array of colors. A color could be represented a number of ways, one of which is to give brightness levels for red, blue, and green that range from 0 to 255.

An example image file could be (in hexadecimal)

00 00 00 03     ; the width (3 pixels)
00 00 00 02     ; the height (2 pixels)
; the first three bytes in each pixel are R, G, and B components
; the fourth is unused
FF 00 00 00     ; bottom left
FF FF 00 00     ; bottom middle
00 FF 00 00     ; bottom right
00 FF FF 00    ; top left
00 00 FF 00     ; top middle
FF 00 FF 00     ; top right

This example (which isn't in any well-known file format) is very close to a version of the BMP file format -- the BMP format has more options, though.

Stop thinking that binary code means anything.

0100.0001 0100.0001 0100.0001
That's
0x41 0x41 0x41

In a text file, it reads as "AAA"

In a BMP image file, it's a rather dark grey pixel. In a JPG file, who knows (try it).

In an 8086 executable file, it would do "INC CX" 3 times. For some other type of processor, it will mean something else.

The interpretation depends very heavily on the context in which it's used. A carbon atom in a brain cell is no different to a carbon atom in a lump of coal, or a carbon atom in the lead of a pencil.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.