Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Confusion over megapixels vs. megabytes

Dec 3, 2010 6:25AM PST
Question:

Confusion over megapixels vs. megabytes


I have a new 14.2 megapixel Nikon Coolpix S6000 digital camera. When I take a photo and check its properties, it shows that the size is 1.8 megs. How do I get it to increase in size up to the 14 megs? I have used a Kodak camera that was only 12 megapixels and when I checked the properties, it showed a size of 3.2 megs.

That does not make sense to me. How is it that the camera with the larger megs takes photos with fewer megs? I have tried about every setting on the Nikon but cannot get it to take a photo with more than 2 megs in size. What does the 14.2 megs stand for? Is it not the size of the photo? Please help me; I'm puzzled by this.

--Submitted by: John M.

Here are some member answers to get you started, but
please read all the advice and suggestions that our
members have contributed to this question.

Industry uses 'mega' far too often! --Submitted by: benrcrom
http://forums.cnet.com/7726-7593_102-5038913.html

Megapixels vs. megabytes --Submitted by: rick1025
http://forums.cnet.com/7726-7593_102-5038921.html

Mega-overload --Submitted by:
http://forums.cnet.com/7726-7593_102-5038918.html

Don't fret. It's not supposed to make sense.--Submitted by: qprize
http://forums.cnet.com/7726-7593_102-5038997.html

Two different things, but slightly related --Submitted by: geoffwaddell
http://forums.cnet.com/7726-7593_102-5038945.html

Thank you to all who contributed!


If you have any additional advice or explanation for John, please click on the reply link below and submit away. Please be as detailed as possible when submitting the answer. Thank you!

Discussion is locked

- Collapse -
Confusion over megapixels vs. megabytes
Dec 3, 2010 1:58PM PST

Digital photos are made up of tiny dots/spots/squares called pixels. Each of these pixels hold information such as brightness, colour etc. Your Nikon Coolpix has 14.2 megapixels which is 14.2 million dots, each one capturing information every time you take a photo. The amount of information captured by each one of these 'dots' or 'pixels' determines the size of the photo file in kilobytes/megabytes.

So, the pixels are nothing to do with the size of the photo they are like the number of digital containers you have available on your camera and the file size of the photo depends on how much picture information you have in each of these 'dots'.

(Mega = approx 1 Million) Pixels = dots - determined by your camera.
Megabytes = the size of the overall file on your computer - determined by how much information each of these millions of dots contains.

If you compress the photo, say to send it via email, then you're reducing the amount of information on each of the pixels. And if you improve the picture with a photo editor you are increasing the amount of information on each of the pixels.

The number of pixels always remains the same but with more or less detail on them and the file size will go up or down accordingly.

Hope this helps

- Collapse -
I LOVE THAT KIND OF PUZZLED FACES !!
Dec 3, 2010 2:04PM PST

OK... BEFORE I START, YOU OUGHT TO CHECK IT OUT AT WIKIPEDIA.COM WITH SEARCH WORDS LIKE megapixel or megabyte .
It is an interesting article, but I profess to not understand everything it is written.
One byte doesnt necessarily mean one pixel in the whole scheme as far as electronics go.
If you say that you set your camera to take maximum resolution of 12mp and the picture file shows about 3 mb which is about roughly right. It can vary as you have menu that offer fine, normal/standard, economy levels of quality or things like 2560x1920 or 1600x1200 or (gasp!) 640x480. These influence the level of byte consumption. Also it has to do with different choices of color like vivid, natural color, B&W or sepia. If you plan to print that photo, it is advisable to choose fine quality . For reqular screen viewing only, normal is adequate. I never tried the economy quality before ,but I am sure that it will require far less bytes per picture of comparable resolution be it 2560x1920 or 640x480.
You know what bugs me the most about most LCD or LED or even those HDTV monitors is that they are limited to 1080 horizontal lines. There is more expensive monitors that can handle upwardly to 1600 lines that sells for $1000 and up. But your 12mp camera can give you something well above 2000 or even 2500 horizontal lines , never mind the vertical lines which is much higher like 4000 or so. Your average LCD or HDTV monitor just pretended to show all the pixels that your camera capture by compress it to fit in the full screen. Picture viewers offer feature that allow you to force your monitor to show every pixel which is swell but you will end up viewing a small fraction of the picture that you have to pan around it to get the whole picture.
What I dont understand about the manufacturers of monitors that stuck at 1080 or 1200 or 1600 despite how large the screen get be it 60 inch diagonally or 22 inch diagonally. I feel dumbed down if I bought a 42 inch monitor that can give me only 1080 lines.
No wonder they are offering fire sales on those huge worthless screens with only 1080 lines. 1080 lines is adequate for video watching like Blue ray DVD movies . For photos , I want a screen that can deliver 3000 horizontal lines.
If you convert your picture format like jpeg or tif into bmp format which is a byte hog . BMP format is like raw format that roughly match a pixel with a byte or three. It is common to have a 12mp photo eating something like 50 mb . BMP format is used for editing like removing undesirable parts of photos to fake it up. Scanners eat up a lot of megabytes because it is saved in bmp format generally but you can tweak it to save in jpg or tif format to save on bytes.
It is just a stupid number game that is all, folks!

- Collapse -
Confusion over megapixels vs. megabytes
Dec 3, 2010 2:11PM PST

Apples and oranges, John. If I understand your question correctly, you are asking why your pictures aren't 14 megabytes...Pixels are the "dots on the screen" that blend into your photo - the more pixels, the sharper your printed enlargements will be (within certain technical limitations - I'm trying to be fairly simple here). You don't really have any need for 14 megapixels (unless you're a professional, which I don't think you are)and plan to sell your work commercially. Megabytes are how much memory your computer needs to store the photo - the more colorful and complex a picture, the more storage memory is required (also the type of photo, as bitmap is more memory-intensive than jpeg). I would seriously suggest you read up on the subject to get some idea of what you are involved in doing.

- Collapse -
Not necessarily

More megapixels does not equal sharper photos. You also have to figure in how strong the AA filter is, sharpening level, and whether the lens on the camera can even resolve 14MP. Take for instance the Canon T2i, with it's kit lens you cannot resolve the 18MP image. To get all the 18MP you have to buy a better lens that can resolve that much of the image. The sensor is just one aspect.

- Collapse -
I Know
Dec 10, 2010 9:27AM PST

I was trying to keep things simple for someone who doesn't understand in the first place...

- Collapse -
If You Use PictureViewer by QuickTime, DON'T!!
Dec 3, 2010 2:36PM PST

I HATE QUICKTIME FOR WINDOWS, because it is equivalent to the intelligence of a toaster operator. You stick a file in and view and put it out, that is it. Your digital camera usually comes with its own picture viewing software in the CD. Digital camera CD has far more powerful software for viewing photos. YOU can ZOOM, ZOOM, ZOOM , ZOOM , ZOOM UNTIL YOU SEE THE VERY BASIC BUILDING BLOCKS OF THE VERY PICTURE YOU ARE VIEWING. Dont panic! There is nothing wrong with your monitor . relax! Zoom out, out, out, out until the picture fit the screen as full once again. you can also click on something that will base the true physical size of your 14mp picture on the 1280x1024 or 1900x1200 resolution of your LCD or LED monitor or even HDTV monitor. Your average monitor simply cannot handle every pixel for pixel of your 14mp picture so your picture appears to be something like a 5 foot wide by a yard high which is the true size of any 14mp picutre.. Your average LCD or LED monitor can hold less than just 2 mp portion of your 14mp picture as snapped by your digital camera. Any average dude wont notice the difference between 2mp and 14mp picture because they cant see the pixels in either one, they are way too tiny. I dont know of any manufacturers who can cram 14mp into a LCD or LED monitor yet. It is said that old fashioned film negatives has an equivalent of 60 mp or something depending on ASA level between 60 to 400 . Wow! But , hey, I cant figure why manufacturers still cant cram more mp into monitors while they can in digital cameras. At football or baseball stadiums, you know those huge LCD screens ? They dont even have one mp at all! Maybe one mp or so. You can see a little coarseness there, huh? You should install the picture viewer software that goes with your digital camera.. ditch the stupid QuickTime picture viewer! Your Windows Live Photo Gallery is much better than Quicktime picture viewer. It can blow up your photo to every pixel for every pixel your monitor can hold.

- Collapse -
Look ma! I can see my nose hairs in my 14mp picture!!!
Dec 3, 2010 2:43PM PST

If you take a picture of your friend standing in front of you then view it in true size of 14mp. The picture will blow up to five feet wide by a yard high. The head of your friend will be so huge that you can see every nose hair or even wrinkles. It is so scientically amazing that you ought to try this!! QuickTime do not have this feature.. Windows Live Photo Gallery has it or the one you got in the CD coming with your digital camera. Install it and have a blast of time counting nose hairs!! They are so clear to see, Amazing!!!!!!!!!!!!:You will suddenly want an 60 inch LCD with 3000 lines !! Maybe they will make them soon!

- Collapse -
megapixels vs megabytes...
Dec 3, 2010 3:56PM PST

Megapixels are the number of pixels the camera is capturing.

Megabytes is the size of the picture on the actual device.

These two don't match and can vary from device to device depending on numerous things...

As you probably know all pictures that digital devices produce are made by splitting the picture up into thousands of little squares, each square contains three sections of information - RED colour, GREEN colour and BLUE colour, each square is known a pixel. The more pixels you have the more detail you get from the picture.

In something like 14.2mp mode you could take a picture and blow it up to probably about the first floor of a house, with very little blockiness appearing in the picture, so unless your taking pictures that you want to put on the side of building 14.2 is a bit overkill anyway (although it does have an advantage that you can use it to "digital zoom" on something when the distance exceeds your manual zoom).

Just to give you an idea a full HD TV has a resolution of 1920x1080 (1080p) which is 1920x1080 pixels (or 2,073,600 pixels which is only 2mp!). So anything beyond about 5mp is really overkill for just standard photos that are printing onto paper anyway, unless you want to do some work on them like cutting bits of the image and using that as a mini-picture in itself (the same way digital zoom works).

As for this Mb to Mp conversion ratio, this all depends on the file format of the camera. Different cameras use different compression methods, the majority use JPG, some use GIF, some of the mega expensive cameras store it as RAW/BMP data.

The best format to go for is the RAW/BMP data as that will give you all the data with absolutely 100% no loss of data whatsoever, and this would give you an accurate size guide for your photo. RAW data basically splits the picture up into pixels and stores each pixel with it's own red green and blue value on a rating between 0 and 255 for each colour (obviously even at this rate there is some loss here as some colours might exceed the 255 threshold, or some colours might have a .5 rating, although as your eyes can actually only see 24-bit colour and that is 32-bit colour, then there really isn't an issue there). The only problem is RAW data does waste an awful lot of space, and really again is overkill for anyone taking just standard pictures, maybe for something like if you were using your camera to record the next Steven Speilberg blockbuster then you might want to use RAW data to store these files, but most of the time JPG or GIF are fine formats.

JPG and GIF both are what is known as "lossy" compression formats. The way they work is that when us take a picture in JPG the data is encoded in such a way to reduce space, this is done by giving repetitive information in the picture a code so that instead of repeating redundant data, a key is built to tell it to use this data, rather than taking up a lot of space. The easiest way to describe this is if you were to do the sum 1 divided by 3 and someone told you to right the answer out in full, you would probably tell them to go and take a running jump, because you'd be there forever more (1/3 is 3.3333333 and you'd be writing 3 continuously for infinity), so instead you shorten the answer to either 3.3 re-occuring or 3.3 with a dot over the top of the second 3 to show people that this 3 re-occurs. And JPEG does a very similar thing, if for example you took a picture at night of the stars, the only information that would need to be stored is the information about where the picture is white (where the stars are), the rest of the sky is black, so instead of storing countless entries of "000 000 000" JPG would realise this and just give it a code like B so data which would appear like this

000 000 000, 000 000 000, 000 000 000
000 000 000, 111 111 111, 000 000 000
000 000 000, 000 000 000, 000 000 000

might in actual fact be stored like this

B, B, B
B, 111 111 111, B
B, B, B

thus removing all the redundant 0's and shortening them to 1 letter, and also taking up a lot less space.

That is obviously only a very basic example and for JPG to actually produce these results it actually performs mathematical calculations on the data to shrink it, unlike the example above.

So therefore the amount of megapixels will not match the amount of megabytes the picture will take up (in RAW a 14.2mp picture would probably take up 3 times that anyway as it has to store three bytes per pixel (R,G,B), and different cameras with different compression methods all store information differently. Some cameras also have a fine mode to use a lower compression as well.

One important thing to remember though is if you edit the picture on your PC, start by first saving the originals in BMP format, and then save from that into GIF or JPG because every time you save a GIF/JPG the compression algorithm loses quality every time, keeping the original in BMP format keeps it with as much information as the original file has.

- Collapse -
I never looked at 1080p like that before
Dec 11, 2010 3:53AM PST

So when you shot full hd the lense is capturing 2megapixels per a millisecond, but I bet thats a whole other discussion. Or is it?

- Collapse -
Pixels V Megabites
Dec 3, 2010 5:27PM PST

John, you are getting mixed up with Megapixels and megabites.

I have 13 megapixel canon I took a JPeg image on medium JPeg setting, when I opened it in properties it took up 2.8 megabites of space on the compact flash drive and this is what you are seeing. I opened it up in pphotoshop and checked the image size and this came out at 36.4 megabites, so this is the actual size of the image.

Hope this helps and makes sence to you.

In one of the posts it says you can only open a Nikon raw file in their software. This is not true, you can open it in Photoshop or Photoshop Elements and if you do use the raw setting on your camera you retain all the information in the image, as it is like the negative on a film camara, not like a JPeg which dumps information to reduce the image size and this information is lost forever.

Brian.

- Collapse -
Overlooked something?
Dec 3, 2010 5:27PM PST

It's possible that this camera has multiple possible image sizes, something that was not there on your previous camera. If it was originally set to 7 or so Megapixels and you have not altered it, it may be the answer to the reason why you are getting "small" images in terms of space usage.

Just a possibility!

It's VERY unlikely that the camera would compress to such a lossy JPG - an older generation coolpix I had would give 1.4 MB images - and that was a 4 megapixel camera.

You can easily troubleshoot this by checking out the size of your images. At 14 megapixels, they should be at least 3000 x 4000, if the images are a lot smaller, then this is your problem

- Collapse -
ooooooo
Dec 3, 2010 6:15PM PST

megapixels is the light sensor like full hd 1920 times 1080 around 2 megapixels megabytes is the memory using to processing the photos different photos different scenery produce different megabytes megabytes is image memory megapixels is how many pixels in camera capture light image sensor

- Collapse -
megapixels
Dec 3, 2010 8:22PM PST

Hi bird 1007:
try proof reading your comment because it makes absolutely no sense what so ever.
docweddle

- Collapse -
Check the file format that your taking pictures at.
Dec 3, 2010 8:10PM PST

Nikon has various ways of saving pictures, Jpg (in a lower resolution) TFF which will definitely increase the file size. However, I don't own this camera, but I did download the manual from Nikon and it explains the resolutions on pg 37 & 38. It is always good to understand how you are going to use the picture. Stuff for web, facebook, flickrs, etc can be and should be in as smaller resolution, while photos that are going to be printed need the the higher, therefore bigger file size. Hope this helps.

- Collapse -
Apples vs Kumquats
Dec 3, 2010 8:26PM PST

First, a BYTE of memory is comprised of 8 discrete BITS, each representing a '1' or '0' in a power-of-2 format.

Second, in JPEG format, it does not take a full 8-BIT BYTE to represent the color of a pixel. JPEG is called a 'lossy' format, good as it is, because it uses data reduction (compression) to represent a final photo. It can also feature many LEVELS of data compression that result in different file sizes. Some of the original color resolution is lost, but it's pretty hard to tell that, right? Let's call JPEG an EFFICIENT photo file format with satisfying results, but it is not THE highest quality format.

Open a JPEG file on your computer, re-save it as a TIF file then check its size. Does the word WHOPPER come to mind? It's because TIF is a very lossless type of format that uses MORE than 1-BYTE per pixel to preserve maximum pixel color resolution. It is a higher quality format over JPEG as a result, but it costs you a TON of storage space.

Beware ... converting FROM JPEG to TIF does NOT restore the data a JPEG file threw away when it was saved. TIF is a nice ORIGINAL file format on which you can edit and then save as a final JPEG product for efficient storage. The next level of resolution is RAW format, but we're not going there today!!

- Collapse -
Megapixels vs how the photo is saved
Dec 3, 2010 10:20PM PST

When you take a picture, the camera uses all the pixels available in capturing the picture. But when your camera saves that picture, most no-pro cameras save the picture as a JPEG file. This is a compressed file format which compresses the photo down to a smaller size. Thus the decrease in file size from what you thought you would get. I am a surprised that you can't get a larger file size using the Extra-Fine, Fine, or Best quality setting however. Check your camera manual or go see a camera shop for information on how to set it and use it for the best quality photos it can take. The only to get the full sensor output file size is using what is called Camera RAW, instead of JPEG format photos. This is what advanced amateur and pro cameras offer, and is the full sensor data in uncompressed form. Naturally these cameras cost more. Hope this helps!

- Collapse -
megapixels vs megabytes
Dec 3, 2010 11:04PM PST

Megapixels refers to the maximum size that pictures can be en larged to the megabytes refer the file size of the individual pictures. Megapixels are primarily designed for cropping of editing of your photos. HD picture files are usally about twice the file size of regular picture files and therefore give higher resolution (high definition). This was not mentioned in your information request so I thought it might be helpful. There is nothing wrong with your camera because without getting technical, the size of the cameras image sensor also comes into play. If you are getting good pictures do not sweat the small stuff.

- Collapse -
huh?

I've heard of HD video, but that's just the linear resolution of a video format. There isn't an HD resolution for photos.

- Collapse -
You're right to think size matters...
Dec 3, 2010 11:46PM PST

You're right to think size matters, so let's take a look at the type of file you are saving which can make a huge difference.

Most digital cameras will typically create images in a .jpg (or jpeg) file format. A jpg file is a compressed version of the photo and the amount of compression can usually be selected on the camera with choices ranging from small to large file sizes. The trade off is, as the file size shrinks so does the quality of the image. This is why professionals shooting for publication will use a .raw file format, which is an uncompressed file now available on many mid to high end digital cameras.

Want to see an example of what compression does to your photo? Take a page out of one of the sales circulars from your daily newspaper, as it is printed we will consider this to be the raw format. Now take this page betweeen your hands and loosely ball it up to the size of a softball and then flatten it out. You can see the effects of the compression, but still have a good quality image much like a large size .jpg image. Now if you take this same page and ball it up to the size of a tennis ball, then flatten it out you will have an image similar to a medium size .jpg image. Try it one more time balling the page up as tightly as you can before flatting it out. This will represent the smallest file size and I am certain you will see extreme degradation of the page.

We all want the best of both worlds: the best quality image with the maximum number of images on our memory card. Understanding the trade offs between number of images and quality of images should help you determine what file format and compression ratio best suits your needs. And remember, if you want to have that awesome photo you just took published in your favorite magazine you better be shooting in the raw - file format that is. Happy shooting.

- Collapse -
Nikon manual and website can help explain it all
Dec 4, 2010 1:44AM PST

Most digital cameras allow you to adjust the megapixel setting. Generally, the more megapixels, the better the image quality (up to a point, depending on image dimensions) but also the more megabytes of memory required to store the image (due to the way jpeg compression works, the image content also plays into the megabytes required for a given number of megapixels).

From the Nikon website, these are your camera's possible settings for number of megapixels:
Image Size (pixels)
4320 x 3240 (14M)
3264 x 2448 (8M)
2592 x 1944 (5M)
2048 x 1536 (3M)
1024 x 768 (PC)
640 x 480 (VGA)
4224 x 2376 (16:9)

You can get you product manuals at: http://support.nikonusa.com/app/answers/detail/a_id/16762

However, the manual says the default image mode is the 4320x3240 megapixel size when in the "auto" mode. Perhaps you set it to a lower resolution mode?

The manual does say (page 49 of the pdf) that when in multi-shot 16 mode the image is set at 5M (megapixels) and when in the Sport continuous mode, it is set at 3M - perhaps that is your problem?

Hope this helps.

As for confusion over the difference between megapixels and megabytes, this might be helpful from the Nikon website to better understand what's going on:

"Why doesn't the file size equal the number of megapixels in my images?"

http://support.nikonusa.com/app/answers/detail/a_id/16733/related/1/kw/how%20many%20images%20can%20I%20put%20in%20my%20coolpix%20s6000%20memory%3F/r_id/116678

PS: I note they mention a firmware update on the website. As with all firmware updates, if it ain't broken, think long and hard about updating the firmware!

- Collapse -
concise
Dec 12, 2010 10:26PM PST

Thanks for a good reply that addresses the original post, rather than vague ranting which are by and large which were off topic, (there have been some really informative posts too).

- Collapse -
Confusion over megapixels versus megabytes
Dec 4, 2010 2:54AM PST

Let's start with the basics:

Megs is just another word for mega, which is a unit of measurement equivalent to 1 million. That is, one megapixel equals 1 million pixels, 1 megabyte (MB) equals 1 million bytes. Pixels are used to measure the resolution of the sensor in your camera. Your Nikon Coolpix is capable of taking pictures with a maximum resolution of 14.2 megapixels, and you set this using the menu options in your camera, as I think you have done.

Megabytes is a unit of measurement of the size of a file in this case. The picture that you upload to your computer is a file that occupies 1.8 MB (mega bytes) in your example.

So, if you shoot pictures with a resolution of 14.2 megapixels, the files will occupy 1.8 MB. In contrast, if you set the resolution your camera to, say 8 megapixels the file might be around 1 MB in size.

I hope this helps.

- Collapse -
Yeah but

Your definition shows a direct correlation relationship between megapixels and megabytes which is not the case, as was shown in his initial post that his 12MP files from a previous camera are larger than his 14MP files from his current camera.

- Collapse -
Actually...
Dec 10, 2010 10:27AM PST

There's more to it than that and there is a correlation. Its dependent on how a camera goes about making the file. There is no standard way to compress a photo into a .jpeg/.jpg file. And then you can adjust the setting so the camera can record more or less data when saving a file, thus impacting the size even more.

I'm sure that a Nikon Camera compresses differently than a Kodak, so you'd have to compare to similar cameras by brand and settings, than by megapixel.

But generally, the higher the megapixel the bigger the file size.

- Collapse -
pixel bytes
Dec 4, 2010 5:50AM PST

I have a pentax k-x - 12.4 megpixls.
via menus I reduced my megpix's to 10
because it creates a smaller megbyte file
that doesn't take so long to download in email.
plus - there is no noticeable difference in
pic quality. only time you need 12.4 or more
is if you are going to print a mega picture,
larger than 8 x 10, or crop and expand a
small portion back to 8 x 10, which, I would
recommend be done in stages to allow photoshop or
whatever to more easily expand and fill.

- Collapse -
Picture sizes
Dec 4, 2010 8:24AM PST

I don't use a Nikon camera so can't tell you the exact terms they use to define their image specs but all digital cameras offer a range of image sizes and resolutions. Your camera manual should provide this info, usually in a table format. The table will include columns with names similar to Record Mode, Pixel Count, Compression, File Format, and File Size.
You can set these parameters in the camera to obtain whatever image size you want. For example:
Record Mode can be set to RAW, TIFF, Super High Qual, High Qual, or Standard Qual.
Pixel Count: can be set a range of sizes from high (3200x2400) down to low 640x480,
Compression can be set to a range from none (Uncompressed) to various higher rates.

Setting these to your preference will produce images with whatever megabyte size you want.

- Collapse -
Not true

Setting preferences for compression will not give you a certain file size. Different photos have different amounts of data in them. Take a look at your photos sometime, the files sizes might be similar but they will vary due the scene the shot was taken in or the settings that were used.

- Collapse -
MP
Dec 4, 2010 9:48AM PST

hey check out the setting.if it still not working then contact your dealer...!!!!

- Collapse -
Confusion over megapixels vs. megabytes
Dec 4, 2010 11:34AM PST

I think the best way to explain it is megapixels the resolution and megabytes if the size of the file. megapixels refer to the number of pixels in the photo or film. The greater number of megapixels the better the resolution of the picture. Megabytes refer to how may bytes are in the file that has the photo or film. the 1.8 megs is probably referring to the size of the file itself and not the pixels. I hope this helped to explain it.

- Collapse -
Paradox: The better the photo - the smaller the file size
Dec 4, 2010 5:31PM PST

Many other members has already explained the difference between Megs, compression ratio and various JPG quality and size.

However, you may still expect that a similar photo with a greater resolution (from the camera with more Megapixels) should produce a bigger file (more Megabytes) assuming both use the same compression algorithm. It needn't be the truth. If the first camera is of better quality than the second, it will produce much smaller files because:

THE BETTER THE PHOTO - THE SMALLER THE FILE SIZE.

It may seem paradoxical, so I will explain it in detail. Many people think that the number of Megapixels is the main factor defining the quality of the camera and the quality of the photo. It's not true. There are many other, much more important factors. One of them is "noise" which is a great problem especially with cheap compact cameras which have too many megapixels packed on a physically small sensor.

Imagine a great part of your photo is the sky which is evenly blue or has an slight gradient from a lighter blue to a bit darker blue. Now try to describe this region in the natural language. Let's assume that it is a square 100px X 100px, so you needn't describe the color of each pixel, you can say: square 100x100px of RGB 170,220,225 (light sky blue), or in case of a gradual change: gradient from RGB 170,220,225 to 160,214,255 (a bit darker blue). So without writing the RGB value of each pixel (what will need 100x100=10000 RGB values), you can describe this region using much less words but without losing any information about the color of this region. And this is similar to how compression algorithms work.

In a good photo, all pixels on the sky should be blue, or change gradually from one shade of blue to another one. And now open any of your photos in a graphic program with a magnifying glass tool, chose a small area which should be in the same color, and magnify view to see individual pixels. You will see that the region seems to be blue only when not magnified. You will probably see that individual pixels are not of the same shade of blue. There can be many pixels which are even not blue at all, but gray, green or even pink. This is called the "noise". If you can't see the noise, it means you have a very good camera. Take a photo from a cheaper camera or eventually taken by a mobile phone and you will surely see much noise. Now you can't describe this region shortly as above. You must write the RGB value of each pixel in the region if you don't want to lose information. And a compression algorithm (especially a lossless one) doesn't know if it is the noise or perhaps you have taken a photo of falling snow and you would like to save it. That's why a photo with more noise, taken by a worse camera, will need more megabytes, so a bigger file to save it.

So don't bother about the megabytes and size of your files. Be happy if they are small, not only because you will save space on your card or disk, but you probably have a better camera.

But you needn't bother about the number of megapixels, either. A little resolution (too few pixels) was a problem several years ago in the early stage of digital photography. 1 or 2 megapixels were really too few for a good resolution of a photo, similar to an analog film. But when the number of megapixels exceeded about 10 (compatible with the grain of an analog 36mm film) even in popular compact cameras, the problem ceased to exist (what meant also the final death of analog photography).

Notice also that cheap cameras has the number of Mpx written with big letters on the camera and on the box, while more expensive SLR cameras (like for example Nikon D90) have not. Why? Because it's not important. Experts or pros pay for D90 not because of the number of pixels. They pay for the QUALITY of pixels, it will generate.

So don't worry about any megs, megabytes or megapixels, just take good photos. And when buying your next camera, pay attention to many more important factors, but it's not the place to write about them all.