473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Pixel data type

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!
Nov 14 '05 #1
3 3787
In article
<WT*********************@bgtnsc04-news.ops.worldnet.att.net>,
"alex" <al**@xxx.net> 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.
Nov 14 '05 #2
"alex" <al**@xxx.net> 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
Nov 14 '05 #3
On Tue, 02 Mar 2004 08:10:40 +0000
Christian Bau <ch***********@cbau.freeserve.co.uk> wrote:
In article
<WT*********************@bgtnsc04-news.ops.worldnet.att.net>,
"alex" <al**@xxx.net> 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.
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dennis Myrén | last post by:
Hi. I use System.Drawing.Bitmap to copy bitmap pixel data. I use LockBits to retrieve a BitmapData which in turn provides me with the Scan0 property which i then use to loop the pixel data using...
2
by: victor | last post by:
hello, I have several arrays containing (image-) pixel data; I want to display it onto a PictureBox. What is the best Graphics method for it? (MSDN examples talks only about loading it from...
8
by: **Developer** | last post by:
Seems that Dot.net can not handle files of Indexed Pixel Format as well as other types of formats. Given a file or and Image of type Indexed Pixel Format is there a method to convert it to some...
1
by: fripper | last post by:
In VB 2005ave a I have a picture control ("pix") on which I want to set each pixel color according to a variable, X, that has been calculated (I'm drawing fractals from the Mandelbrot Set). I use...
13
by: Martijn Mulder | last post by:
I try to define a line with the length of 1 unit (1 pixel) that is, in fact, just a point on the screen. But when I draw it with a wide pen with the appropriate StartCap and EndCap (Round), it will...
33
by: Dave (DreamIsle) | last post by:
Hello. I'm working on a layout that I need to be pixel specific. How can I get the font to stay precisely the height I need? Specifying line-height or font-size in px doesn't yield the results I...
30
by: Chaos | last post by:
As my first attempt to loop through every pixel of an image, I used for thisY in range(0, thisHeight): for thisX in range(0, thisWidth): #Actions here for Pixel thisX, thisY But it takes...
4
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I have an RGB color held in a Int32 variable. I using an unsafe code to loop through Bitmap data, and by using the BitmapData.Scan0 pointer I need to copy the Int32 color value into the Bitmap...
1
by: ofiras | last post by:
In bitmap, how can I find the nearest pixel (pixel 1) to a specific pixel (pixel 2) that has different color from pixel 2? Or how can I find a pixel in a specific distance from pixel 2 (like a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.