relate pixels to bytes?

Discussion in 'Software' started by jdlittle, Nov 24, 2006.

  1. jdlittle

    jdlittle Private E-2

    Does anyone know how these two are related?? About 1:1??
     
  2. theefool

    theefool Geekified

  3. goldfish

    goldfish Lt. Sushi.DC

    Uh okay.

    Short answer: they don't. At all.

    Long answer:

    A byte is 4 bits.

    In a colour Bitmap image you have 4 values being represented, red green and blue. Depending on the "bit depth" of the image, each value is represented by a certain number of bits. A standard depth these days is 16-bit. This means that each pixel is represented by 16-bits. Divide this by four and you get the number of bytes per pixel (4 bytes).


    UNLESS you are using image compression, which uses lots of funky algorithms which means you don't need to give explicit values for every single pixel. This is the case, for example, with JPEG.
     
  4. theefool

    theefool Geekified

    Hrmm, I thought there were 8 bits in a byte. :)
     
  5. BCGray

    BCGray Guest

    History
    This section does not cite its references or sources.
    You can help Wikipedia by introducing appropriate citations.

    The term byte was coined by Werner Buchholz in 1957 during the early design phase for the IBM Stretch computer. Originally it was defined in instructions by a 4-bit byte-size field, allowing from one to sixteen bits (the production design reduced this to a 3-bit byte-size field, allowing from one to eight bits in a byte); typical I/O equipment of the period used six-bit units. A fixed eight-bit byte size was later adopted and promulgated as a standard by the System/360. The term "byte" comes from "bite," as in the smallest amount of data a computer could "bite" at once. The spelling change not only reduced the chance of a "bite" being mistaken for a "bit," but also was consistent with the penchant of early computer scientists to make up words and change spellings. However, back in the 1960s, the luminaries at IBM Education Department in the UK were teaching that a bit was a Binary digIT and a byte was a BinarY TuplE (from n-tuple, i.e. [quin]tuple, [sex]tuple, [sep]tuple, [oc]tuple ...).[citation needed] A byte was also often referred to as "an 8-bit byte", reinforcing the notion that it was a tuple of n bits, and that other sizes were possible. Other sources have also said that the word byte comes from the following: BinarY TablE[citation needed]
    A contiguous sequence of binary bits in a serial data stream, such as in modem or satellite communications, or from a disk-drive head, which is the smallest meaningful unit of data. These bytes might include start bits, stop bits, or parity bits, and thus could vary from 7 to 12 bits to contain a single 7-bit ASCII code.
    A datatype or synonym for a datatype in certain programming languages. C, for example, defines byte as a storage unit capable of at least being large enough to hold any character of the execution environment (clause 3.5 of the C standard). Since the C char integral data type can hold at least 8 bits (clause 5.2.4.2.1), a byte in C is at least capable of holding 256 different values (signed or unsigned char doesn't matter). Java's primitive byte data type is always defined as consisting of 8 bits and being a signed data type, holding values from -128 to 127.

    Early microprocessors, such as Intel's 8008 (the direct predecessor of the 8080, and then 8086) could perform a small number of operations on four bits, such as the DAA (decimal adjust) instruction, and the "half carry" flag, that were used to implement decimal arithmetic routines. These four-bit quantities were called "nibbles," in homage to the then-common 8-bit "bytes."
     
  6. goldfish

    goldfish Lt. Sushi.DC

    You know, you're right :p

    I thought that number seemed a little big. I'm getting a bit confused with my number systems :p I was working in hexary :p
     
  7. theefool

    theefool Geekified

    I prefer binary, but I have worked with "hexary", and octo.
     
  8. goldfish

    goldfish Lt. Sushi.DC

    Hexadecimal is the way to go :p
    DEADBEEF
    DECAFBAD
    Ah the fun that can he had with hex...
     
  9. jdlittle

    jdlittle Private E-2

    I was just curious as I'm involved in digital photography and was noticing file sizes of photos---thanks for the replies--
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds