Skip to Content

Relations between Kb and Pixels

Share and discuss your images (strictly SANparks related)
User avatar
Josh of the Bushveld
Junior Virtual Ranger
Junior Virtual Ranger
Posts: 1904
Joined: Tue May 19, 2009 2:15 pm
Location: Johannesburg - too far from the closest Sanpark

Re: Relations between Kb and Pixels

Unread postby Josh of the Bushveld » Thu Dec 03, 2009 12:03 pm

Interesting.
I've never programmed PICs at such a low level. (Am also an electrical engineer by training :) )
The 'mite formerly known as joshilewis

FGASA Level 1 Guide

Glen Reenen TR

15-18 June: Berg-en-dal

User avatar
HoepHoep
Junior Virtual Ranger
Junior Virtual Ranger
Posts: 229
Joined: Thu Jul 27, 2006 3:52 pm
Location: Worcester South Africa

Re: Relations between Kb and Pixels

Unread postby HoepHoep » Thu Dec 03, 2009 12:09 pm

Hi Guys

Yes it is very confusing.
I do agree joshilewis that a 0 take as much place as a 1.

But look at this colour: 111111000000
This colour can be represented with this algorithm 1(6)0(6). Now that takes much less space!

joshilewis, you are absolutely correct about the jpg way of compressing. It compares the colour of a bit with the adjoining ones and then calculate a new "average". The more the variation in colours the less the ability to "get away" with averages, hence the bigger the jpg. If you take a photo of white wall, jpg will compress it like you can't believe.

From the above you will understand that jpgs gave two problems:
1, you get pixelating. There are basically less blocks to make up the image and smooth curves become jaggery, (spelling?)
2 you loose tints. This is often most visible in your dark colours that became black and your light tints that get washed out to white. I always check the darkest part of the image to ensure that there is still detail, if not, the compression is to much.
The Creator is bigger than His creation!

My latest trip report to Addo during June 2009:
http://www.sanparks.org/forums/viewtopic.php?f=27&t=34300

User avatar
DuQues
Honorary Virtual Ranger
Honorary Virtual Ranger
Posts: 17941
Joined: Fri Jan 14, 2005 5:42 pm
Location: Red sand, why do I keep thinking of red sand?

Re: Relations between Kb and Pixels

Unread postby DuQues » Thu Dec 03, 2009 12:20 pm

Avatars....
Really simply explained that goes something like this:

The avatar is maximum 70x70 pixels. So that gives you 490 pixels. In pure black and white that would give you 490x2 (colours) = 980 bytes. Add a few things like the header of the file and such info, and you still get a tiny file.
However most people use a few more colours, like 16 million or true colour which is 24 bits per pixel. 490 x 24 11760 bytes, and added to that is the file info and such.

I played around a bit with this photo:
Image
and made this avatarsized cutout:
Image
(I think I used it as avvy a while?)

Now I saved it in a few formats, this is what you get:

5.955 meerkat_gif_256.gif (GIF format, interlaced)
5.960 meerkat_gif_256_normal.gif (GIF format, non-interlaced)
1.113 meerkat_gif_8.gif (GIF format, 8 colours)
6.379 meerkat_grey.gif (GIF format, greys only)
30.138 meerkat_jpeg_12.jpg (JPEG, full quality)
26.462 meerkat_jpeg_8.jpg (JPEG, normal quality)
14.764 meerkat_png_int.png (PNG format, interlaced)
13.101 meerkat_png_non.png (PNG format, non-interlaced)

So for avatars you are best off using PNG or GIF. As you can see the JPEG's, even at lower qualities are too large. GIF and PNG only use 256 colours, but it's more than good enough for avatars. Don't use it for your photos though!
Arriving currently: The photos from our trip! Overhere! :yaya:

Feel free to use any of these additional letters to correct the spelling of words found in the above post: a-e-t-n-d-i-o-s-m-l-u-y-h-c

User avatar
Josh of the Bushveld
Junior Virtual Ranger
Junior Virtual Ranger
Posts: 1904
Joined: Tue May 19, 2009 2:15 pm
Location: Johannesburg - too far from the closest Sanpark

Re: Relations between Kb and Pixels

Unread postby Josh of the Bushveld » Thu Dec 03, 2009 12:22 pm

HoepHoep wrote:Hi Guys

Yes it is very confusing.
I do agree joshilewis that a 0 take as much place as a 1.

But look at this colour: 111111000000
This colour can be represented with this algorithm 1(6)0(6). Now that takes much less space!

Sure, except the '(6)' takes up 3 bits anyway :) How do you encode that scheme anyway?

Physically, on a drive platter, CD, magnetic tape etc, a '0' takes up as much space as a '1'. It would be the same for transistors in any type of solid state memory. Not so?
The 'mite formerly known as joshilewis

FGASA Level 1 Guide

Glen Reenen TR

15-18 June: Berg-en-dal

Scipio
Posts: 4758
Joined: Fri Sep 07, 2007 11:22 am

Re: Relations between Kb and Pixels

Unread postby Scipio » Thu Dec 03, 2009 12:26 pm

:popcorn: Still reading, just something that came to mind, what format is currently the best to take pic's? :hmz: Irrispective size, pixels or kb's.

User avatar
Switchback
Posts: 817
Joined: Mon May 04, 2009 9:32 am
Location: Northwold with KTP on my mind...

Re: Relations between Kb and Pixels

Unread postby Switchback » Thu Dec 03, 2009 12:28 pm

I GIVE UP! :huh:

I agree with some and disagree with other... I don't think there is any hard and fixed rule for the relations between KB and Pixels, end of story IMHO.
KNP: 14 June: Skukuza Camping
15 -21 June: Letaba Camping

User avatar
Josh of the Bushveld
Junior Virtual Ranger
Junior Virtual Ranger
Posts: 1904
Joined: Tue May 19, 2009 2:15 pm
Location: Johannesburg - too far from the closest Sanpark

Re: Relations between Kb and Pixels

Unread postby Josh of the Bushveld » Thu Dec 03, 2009 12:28 pm

Scipio wrote::popcorn: Still reading, just something that came to mind, what format is currently the best to take pic's? :hmz: Irrispective size, pixels or kb's.

Most, if not all, cameras allow you to take either in JPEG, or in RAW (or both). The format of a RAW file is proprietary to the camera manufacturer, and you often need some extra software (i.e. not included in Windows) to view RAW files.

The choice of JPEG or RAW really depends on how much post-processing etc you do.
The 'mite formerly known as joshilewis

FGASA Level 1 Guide

Glen Reenen TR

15-18 June: Berg-en-dal

User avatar
Josh of the Bushveld
Junior Virtual Ranger
Junior Virtual Ranger
Posts: 1904
Joined: Tue May 19, 2009 2:15 pm
Location: Johannesburg - too far from the closest Sanpark

Re: Relations between Kb and Pixels

Unread postby Josh of the Bushveld » Thu Dec 03, 2009 12:30 pm

Switchback wrote:I GIVE UP! :huh:

I agree with some and disagree with other... I don't think there is any hard and fixed rule for the relations between KB and Pixels, end of story IMHO.

Hahaha, have we driven you to that point? :)


joshilewis wrote:The choice of JPEG or RAW really depends on how much post-processing etc you do.
And how much memory you have. RAW takes up a lot more space.
The 'mite formerly known as joshilewis

FGASA Level 1 Guide

Glen Reenen TR

15-18 June: Berg-en-dal

Scipio
Posts: 4758
Joined: Fri Sep 07, 2007 11:22 am

Re: Relations between Kb and Pixels

Unread postby Scipio » Thu Dec 03, 2009 12:33 pm

I don't really do any post processing but might start. 8) Memory is no problem with my new kit. :thumbs_up:

What is better for what, :hmz:

On Kb's vs. Pixels, I think every pic will differ due to colour, shades etc. :tongue:

BTW, I just love this section of the forum. :whistle:

User avatar
Switchback
Posts: 817
Joined: Mon May 04, 2009 9:32 am
Location: Northwold with KTP on my mind...

Re: Relations between Kb and Pixels

Unread postby Switchback » Thu Dec 03, 2009 12:45 pm

joshilewis wrote:Hahaha, have we driven you to that point? :)


Yip! :thumbs_up:

In terms of RAW vs JPEG in respect of post processing. A lot of people don't take pics in RAW format as they say it takes so long to do post processing. For me that is not true. If you have to crop, edit or do whatever anyway afterwards, it will take you the same time. Also, you can bulk convert all your RAW images to JPEG if you simply want to view them.

Just to give you another indication: The other day a guy was arguing with me that he can do all post processing in Photoshop on a JPEG as I can do on a RAW file. So, I took a picture of someone with the complete wrong White Balance. One in JPEG and one in RAW. Then I said lets see who's finished firsts correcting the white balance, I work on the RAW file and he on the JPEG, both in Photoshop. I was finished within 10 seconds. After 5 minutes he gave up... He came close, but not quit.

For me, there's no comparison, shoot RAW!! (And I can go on and on and give tons of examples why...) :wink:
KNP: 14 June: Skukuza Camping
15 -21 June: Letaba Camping

User avatar
DuQues
Honorary Virtual Ranger
Honorary Virtual Ranger
Posts: 17941
Joined: Fri Jan 14, 2005 5:42 pm
Location: Red sand, why do I keep thinking of red sand?

Re: Relations between Kb and Pixels

Unread postby DuQues » Thu Dec 03, 2009 1:02 pm

Josh, you missed out on one little thing....
With Lightroom you can edit JPEG's as well, including white balance etc...

However I agree with you, always shoot RAW! (Or DNG if your camera will let you.)
There is no reason to skimp on space, a 500 GB disk is almost the same price as one of 1 TB.
Arriving currently: The photos from our trip! Overhere! :yaya:

Feel free to use any of these additional letters to correct the spelling of words found in the above post: a-e-t-n-d-i-o-s-m-l-u-y-h-c

User avatar
Josh of the Bushveld
Junior Virtual Ranger
Junior Virtual Ranger
Posts: 1904
Joined: Tue May 19, 2009 2:15 pm
Location: Johannesburg - too far from the closest Sanpark

Re: Relations between Kb and Pixels

Unread postby Josh of the Bushveld » Thu Dec 03, 2009 1:04 pm

Yes, white balance is one of the major things one can correct if shot in RAW, that can't be corrected in a JPEG.
The 'mite formerly known as joshilewis

FGASA Level 1 Guide

Glen Reenen TR

15-18 June: Berg-en-dal

User avatar
Kicker Cat
Posts: 137
Joined: Sat Feb 07, 2009 10:27 pm

Re: Relations between Kb and Pixels

Unread postby Kicker Cat » Wed Dec 16, 2009 9:18 am

Hi Guys,

For what it's worth - you may well find the answer to this question on one of the Adobe forums - somewhere at www.adobe.com There are some real wizards there and the answers nearly always make sense

Raw is the way to go but you have to commit the time to process into viewable pics

User avatar
Klystron
Junior Virtual Ranger
Junior Virtual Ranger
Posts: 56
Joined: Sun Feb 13, 2005 9:42 am
Location: Ballito, KZN, RSA

Re: Relations between Kb and Pixels

Unread postby Klystron » Fri Apr 02, 2010 7:34 pm

Hi Guys,
I would like to add my 2 cents worth on the matter of pixels in pictures.
A pixel is an abbreviation for Picture Element and is the smallest single bit of colour information that can be displayed by the device in question. In a TV set (the older type with a tube that required warming up) you can see these pixels as a group of three dots or on a Sony Trinitron, three vertical bars, one for each of Red, Blue and Green.

The CCD in a camera is similar except of course for the number of pixels. A TV (not HD) has 640 x 480 pixels (307200) whereas my Canon has 3888 in the horizontal plane and a total of about 10 000 000 (10M). Each of these pixels would have a number of bits allocated to them to represent the brightness of the light on that pixel as discussed earlier in the thread. Normally this would be at least 10^12 (1 followed by 12 zeros) or, as normally stated 12 bits. The amount of information to be stored in this example would be 10M x 12 bits. Most computer systems tend to use 8 bits per byte meaning that an uncompressed picture would be 120megabits divided by 8 giving 15 Megabytes of data. In this case it would not matter if the picture was black, white or any colour in between.

Using a compression algorithm such as JPEG will reduce this considerably with the amount depending on the detail of the picture. A picture with large areas of the same colour would compress much more than one with very small areas of different colours.

I hope this helps a bit.


Return to “SANParks Camera Club”