Pixel data type

A

alex

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!
 
C

Christian Bau

"alex said:
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.
 
R

Richard Bos

alex said:
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
 
F

Flash Gordon

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top