Velocity Reviews > Picture Size (Pixels & Kb)

# Picture Size (Pixels & Kb)

tallmanirl
Guest
Posts: n/a

 01-27-2007
Hello everyone,
what is the relationship between the no. of pixels a picture has, it's
width and height and the Kb it takes up, esp. pix on the Web.

Thanks,

Fergal.

Ron Hunter
Guest
Posts: n/a

 01-28-2007
tallmanirl wrote:
> Hello everyone,
> what is the relationship between the no. of pixels a picture has, it's
> width and height and the Kb it takes up, esp. pix on the Web.
>
> Thanks,
>
> Fergal.
>

Well, a lot goes into that kind of relationship. First, and most
significant, is the method of compression. Most formats used on the
internet are compressed by one method or another. The most common are
..jpg and .gif. Both handle color well, but each has its limits, and
good and bad points. Generally, whatever method is used, pictures are
larger the more pixels they contain. By using .jpg compression, it is
possible to compress the image to a small fraction of its original size
while still retaining a satisfactory image.

Randy Berbaum
Guest
Posts: n/a

 01-28-2007
tallmanirl <(E-Mail Removed)> wrote:
: Hello everyone,
: what is the relationship between the no. of pixels a picture has, it's
: width and height and the Kb it takes up, esp. pix on the Web.

: Thanks,

: Fergal.

The relationship between the dimensions in pixels and the number of
"megapixels" the image has. If you multiply the dimensions (Width x
Height) you will get the number of pixels in the image. But the number
will be rounded to achieve a mp number. Also the precise number of pixels
in each mp is somewhat variable. In true binary terms megapixel would
refer to a number that is a power of 2. This number would be not a simple
power of 10 (such as 1000). So a true mp would be 1,048,576 pixels. But
manufacturers who were more marketers than programmers tended to round it
to a multiple of 1,000,000 pixels. So they would count anything from
1,000,000 to 1,999,999 to be 1 mp. This isn't too much trouble at 1mp, but
at some of the higher mp numbers you may have a binary number would be one
mp in binary terms while the marketers would be rounding to the nearest
millions place and placing a value one mp larger than true.

Now as to the relationship between the number of pixels and the storage
space needed is MUCH more complicated. When an image is stored it has not
only the data from the individual pixels but also data that is (mostly)
invisible to the person viewing the image. Then depending on the type of
storage format as to how small the image data can be stored. Some (like
RAW formats) can be very precise in storing an image in nearly the same
space as any other image. But most formats try to do some form of
compression to reduce the file size. Some are better than others and some
are more precise than others. So different formats will store the same
image in a different sized file. Then to complicate things some images
compress differently with each file type and so which format will compress
an image smallest may vary from image to image. For example, lets say that
I am going to save an image but instead of saving the 3 color values for
each pixel I instead save a table that as a color is encountered saves the
3 values and referrences that combination to a single digit. So I have an
image that is only black and white (no grey or color), I could have an
entire image with each pixel being referrenced by a 1 (black) or a 2
(white). If each pixel can be called 1 or 2 instead of 255,255,255 or
0,0,0 this would save a large number of storage space. On the other hand
if I use this same program to save an image that each and every pixel is a
different color, you not only wouldn't save any space but the reference
table would be as large as the original image data on top of the actual
image data. roughly doubling the storage space. One other way an image
could be compressed is if everytime there is a block of pixels is the same
color, it could be stored as the color followed by how many repetes. So an
image with many large areas of the same color could be stored very
compactly (255,255,255 x 1268 takes up much less room than 255,255,255
stored 1268 times). Of course none of the image formats currently in wide
use are really this simple. Each one has very complex math in use to
reduce the raw image data to a smaller space. But the two simple example
will show how it is nearly impossible to predict the exact storage space
needed for all images. Even knowing the format may not give you anything
more than a general range of space requirements for the majority of
images.

If you want to see this at work, take your digital camera and take one
photo, outside of a very busy scene with lots of different colors. Then
take one with the same camera, with the same settings with the lens cap
on, giving you an image that is all one color (black). If you use RAW
format the two images should roughly be equal in size, but if you use
almost any other format (such as JPG) the two image will have vastly
different storage space requirements (the all black one will likely be
TINY).

Randy

==========
Randy Berbaum
Champaign, IL

Gary Eickmeier
Guest
Posts: n/a

 01-28-2007

tallmanirl wrote:

> Hello everyone,
> what is the relationship between the no. of pixels a picture has, it's
> width and height and the Kb it takes up, esp. pix on the Web.

Take the pixel dimensions for each side, divide by 72, and that will be
the image size on a typical computer monitor. This size will usually be
too large to fit on a monitor, so some resizing will be in order. The
key dimension when you do resize will be the number of pixels on each
side. This should be lower than the number of pixels making up the
monitor screen resolution - such as 1024 x 768.

Gary Eickmeier

 Thread Tools

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Jason Cavett Java 5 05-25-2008 08:32 AM jodleren Javascript 2 02-15-2007 12:35 PM Frank ess Digital Photography 0 11-14-2006 05:08 PM Fanta Digital Photography 3 08-31-2003 09:27 PM Bill Mundy Javascript 0 07-06-2003 12:53 AM

Advertisments