View Full Version : pixels and bytes
sculptor
06-13-2004, 10:28 PM
I'm a tad confused.
I had expected a 1:1 correlation between pixels and bytes and never see it.
For example 2048 x 1536 = 3,145,728 pixels at 300 pixels/inch
so
I would assume this at 3.14 meg, however, the computer claims a size of 485 kb and when picture is open, and I ask for properties, it says 9,147,184 bytes
I'm so confused
I seem to be missing the necessary logical leap here------anyone know what is happening? explain this?
confusedly yours
rod
Araich
06-14-2004, 03:17 AM
What kind of image file are you looking at? The format dictates the way the pixel information is stored and how it is drawn by the software.
A raster image with 1 bit per pixel could only be black or white. 4 bits would give you 16 possible colours etc.
Many formats like jpeg are compression formats. They produce files that are small, but are large when displayed.
A warning about compression formats like jpeg/jpg. Every time you save the image it deteriates (dependant on what rate of compression). Personally I keep my archived images as .tiff's - they are big files but do not deteriate on re-saving and are ideal for printing.
RuBert
06-14-2004, 08:23 AM
Araich is right on about image depth. Sometimes you have to work with jpeg files, so just keep the original, rather than saving over it each time. Another lossless format to save to is a photoshop file, which will save any layers you are working with also.
sculptor
06-14-2004, 01:19 PM
OK
I was refering to jpeg which is my default
so I took one of the JPEG images and saved as tagged image file format---tiff and sure 'nuff it saved at a tad over 9 meg.
then I went back to the camera and saved the same image as tiff and got the same memory.
ok-----appertaining thereto, I'm guessing that the images required for digital to slides are within the range of capability of the 3.3 megapixal camera(which seems to have the capacity for a 9 meg tiff?
true?
add-on, Russ "depth and layers"......huh wut?
any other thoughts-advice?
thanx
rod
Araich
06-14-2004, 04:56 PM
Image-depth refers to the number of bits per pixel (more bits, greater colour range).
There are 8 bits per byte. A kilobyte (Kb) has 1024 bytes.
Your 9MB file has 9,437,184 bytes or 75,497,472 bits (holy crap).
Layers are essentially transparent-to-opaque images that float over each other, building up the picture below. The advantage of these is that you can move them around independant of the ones above or below, and alter them without effecting the rest of the image.
Ultimate image file size is dictated by your intended use of the file. For me, the highest function of the file is for print. And that means I need a 300dpi, A4 (approx 30x20cm) file or greater. At present I keep them around 20MB.
fritchie
06-14-2004, 09:18 PM
Part of this is a repeat of what Araich and Russ have said, but here’s a slightly different and hopefully consistent version. One major different is between pixels and bits or bytes. A pixel (picture element) is one dot in a digital image. In your original example of 2048 x 1536 = 3,145,728 pixels at 300 pixels/inch, you are referring to an image which is about 6.83 x 5.12 inches in size.
(I’ve altered the next paragraph a little from last night to correct an error, so if you remember a slight difference, you’re right.)
Since the human eye sees 3 colors, typically called red, yellow and blue (RYB) by artists, but represented in electronic devices as red, green, and blue (RGB) and in print media as cyan, magenta, and yellow (CMY), each pixel requires values of 3 colors to reproduce. Thus, if one byte (ranging in value from 0 to 255 in normal digital arithmetic) is used for each color, this 3.14 M (Mega) pixel image becomes a 9.42 Mbyte image.
They are quite right about jpeg/jpg and tiff or other noncompressed formats. A tiff image is kept in full size on disk or other memory device (9.42 Mbytes, in your example), but a jpeg (joint photographic experts group, a world body for photographic standards) typically is compressed by a ratio of maybe 10:1. In this case, the 9.42 Mbyte tiff would be saved as a 0.942 Mbyte file (942 kilobyte, kbyte) file.
Confused enough?
I generally follow my digital camera’s jpeg default for storage, because this way I can get about 25 - 30 images on a memory chip. With tiff storage, I might get 2 or 3, and I don’t think the original image is that good anyway.
It all depends on your goals. I do find that my digital camera images are sharper than I have a right to expect from the size, but that’s because they are digitally sharpened by the camera.
And that’s another issue entirely.
And, on saving in your computer or other permanent device. Once I save my camera’s images in jpg to disk, I always use that original jpg for later purposes. That way, it never deteriorates. But, if you take this into an image-processing program, expand to tiff, psf (?) (PhotoShop Format), pdf (PhotoDelux Format), or some other larger format, and then recompress to jpg, it gets worse each time you expand and compress. ‘Nuff said.
sculptor
06-14-2004, 09:33 PM
"...digitally sharpened by the camera. ..."
is that called "dithering"?
alternately----as/re compression----if you lay a grid over a picture and note the points of intersection, then using a 10:1 enlargement grid and copy the points of intersection---you then need to freehand in the lines/curves connecting the dots.....I'm guessing that compressing and enlarging a digital image is roughly equal to this process?
true?
not nearly as confused as yesterday, but not outa the woods yet
rod
fritchie
06-14-2004, 09:52 PM
"...digitally sharpened by the camera. ..."
is that called "dithering"?
alternately----as/re compression----if you lay a grid over a picture and note the points of intersection, then using a 10:1 enlargement grid and copy the points of intersection---you then need to freehand in the lines/curves connecting the dots.....I'm guessing that compressing and enlarging a digital image is roughly equal to this process?
true?
not nearly as confused as yesterday, but not outa the woods yet
rod
Dithering is a term I haven’t seen in a long time, and I’m not sure of the full meaning. I believe it is an old “smoothing” or interpolation (expansion) process, in which a relatively small number of jagged (in intensity or density) pixels is converted into an image that appears cleaner.
“Digital sharpening” is a mathematical process in which each pixel is compared to an average of ones in its neighborhood, and then the difference is exaggerated. The particular form I have in mind is “unsharp masking”, and it is a technique developed by NASA early in the space age (and maybe by others even earlier) to make its early, fuzzy images of planetary bodies easier to interpret, while remaining true to the original data.
And, on your example of manually compressing or expanding an image, yes, the digital process is roughly comparable to that in result, but it is much more complicated in practice. The arithmetic is something no human would want to do, for that 10:1 degree of compression or expansion.
RuBert
06-14-2004, 10:55 PM
And, on your example of manually compressing or expanding an image, yes, the digital process is roughly comparable to that in result, but it is much more complicated in practice.
The jpeg compression scheme has to do with throwing away similar pixels next to the one that is saved, and recording relative values mathematically. That is why visually complicated jpeg images usually save to a larger jpeg file size than very simple images.
I'm sure there is a better explanation out on the internet, but basically that is why jpeg images degrade with multiple saves - because information is thrown away each time it is saved.
fritchie
06-15-2004, 06:47 AM
Here's a little more on color representation and the RYB, RGB, and CMY color measuring and reproduction systems.
First, RYB, the familiar red, yellow and blue theory or explanation taught to children at an early age and used by paint artists of all ages. Red and yellow mix to make orange; yellow and blue mix to make green, and so on. All this works fine with paint and a good eye, but a complication occurs when an artist tries to get a good black. In principle, adding all three colors - red, yellow and blue - gives black, but in practice the three typically make a muddy brown. So, a fourth color commonly is used in painting, black itself. And, since mixing colored paints always makes the image darker, a fifth color - white - may be added to lighten the color.
This RYB color system, which rarely goes by those initials, sometimes is called subtractive color because each pigment removes color from the overall image, leaving the visual impression of an opposite color. Thus, yellow pigment removes blue when illuminated by white light, and the image is yellow.
When video monitors - television, computer monitors, and so on - first were invented, people realized that a completely new system was needed to describe colors, and the red, green, blue (RGB) system was invented. With a color monitor, each dot in an image is produced by three closely spaced spots of color, in varying amounts of red, green, and blue. These colors are called additive, because the phosphors on the monitor screen add the corresponding color. A color monitor needs no outside light source - the colors are cleanest in a dark room. Red and green produce not a muddy brown as in painting, but pure yellow.
And, finally, to printed images: The printing industry uses inks which more or less are like an artist’s pigments. Each ink removes part of the color reflected off a white page, leaving or reflecting a visual image of the opposite color, and the ink uses the reflected color for its name. This system is called CMY for cyan, magenta, and yellow. This system, like the original RYB, is back to subtractive. Mixing cyan (a bluish green) and magenta (a reddish purple) makes blue. Cyan and yellow mix to make green. Magenta and yellow make red.
Araich seems to use printed images a lot, so he may have a better slant on the CMY system. The bottom line, for your original question, is that 3 colors are required for each pixel, so the memory size is three times as large as the number of pixels.
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.