Pixel data type

Discussion in 'C Programming' started by alex, Mar 2, 2004.

  1. alex

    alex Guest

    Why can data type of pixels of an image be "unsigned char", "int", or
    "float"? Why not "unsigned int" rather than "int"? How could "float" be
    used for pixels' data type?

    Thanks for your comments!
     
    alex, Mar 2, 2004
    #1
    1. Advertising

  2. In article
    <WTW0c.63488$>,
    "alex" <> wrote:

    > Why can data type of pixels of an image be "unsigned char", "int", or
    > "float"? Why not "unsigned int" rather than "int"? How could "float" be
    > used for pixels' data type?


    Please read what you posted, then ask yourself how this could possibly
    make sense to anyone reading it. I'm not a mindreader, you know.
     
    Christian Bau, Mar 2, 2004
    #2
    1. Advertising

  3. alex

    Richard Bos Guest

    "alex" <> wrote:

    > Why can data type of pixels of an image be "unsigned char", "int", or
    > "float"? Why not "unsigned int" rather than "int"? How could "float" be
    > used for pixels' data type?


    Why is the sky green?

    Richard
     
    Richard Bos, Mar 2, 2004
    #3
  4. alex

    Flash Gordon Guest

    On Tue, 02 Mar 2004 08:10:40 +0000
    Christian Bau <> wrote:

    > In article
    > <WTW0c.63488$>,
    > "alex" <> wrote:
    >
    > > Why can data type of pixels of an image be "unsigned char", "int",
    > > or"float"? Why not "unsigned int" rather than "int"? How could
    > > "float" be used for pixels' data type?

    >
    > Please read what you posted, then ask yourself how this could possibly
    > make sense to anyone reading it. I'm not a mindreader, you know.


    I am. :)

    The answers, in order, are:
    1) Why not?
    2) It can be.
    3) float pixel;

    With the overall comment that this is nothing to do with the C language.
    It is actually something that depends on algorithms and/or hardware
    and/or non-standard libraries. I've dealt with all sorts of strange
    units for pixels including 8 bit unsigned, 10 bit unsigned, 12 bit
    unsigned and 16 bit unsigned and ended up with much stranger
    intermediate representations, generally in assembler.
    --
    Flash Gordon
    Paid to be a Geek & a Senior Software Developer
    Although my email address says spam, it is real and I read it.
     
    Flash Gordon, Mar 2, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. José Mª
    Replies:
    1
    Views:
    1,141
    David Zimmerman
    Jun 30, 2003
  2. Replies:
    9
    Views:
    397
  3. André Wagner

    Fastest pixel by pixel operation

    André Wagner, Mar 17, 2008, in forum: Java
    Replies:
    12
    Views:
    1,059
    Larry A Barowski
    Mar 19, 2008
  4. jimgardener
    Replies:
    1
    Views:
    361
    Knute Johnson
    Jul 8, 2008
  5. jimgardener

    size of pixel data array

    jimgardener, Nov 15, 2010, in forum: Java
    Replies:
    4
    Views:
    674
    John B. Matthews
    Nov 15, 2010
Loading...

Share This Page