74 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

Sorry, but your basic premise is wrong: an image can be encoded as an array of RBG pixels with 8 bits per value, but there are a lot of other ways: one channel with one bit/channel (pure black and ...
remco's user avatar
  • 3,161
51 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

If at the core, photos are just 3 channels of pixel values [0, 255] X RBG, But photos are not "just 3 channels of pixel values" even "at the core." Computer screens are typically made up of an array ...
Caleb's user avatar
  • 31.7k
30 votes

What is the "optimal" file size of JPEG images with respect to their dimensions?

The size of files compressed with JPEG vary depending on the complexity of the image. Trying the control the file sizes the way you describe will result in highly variable perceived image quality. ...
xiota's user avatar
  • 26.9k
25 votes

Two EXACTLY the same .jpg images with one image more than twice the file size of the other - Why?

The JPEG compression algorithm works like this: Instead of being saved as three R, G and B planes, your image is decomposed into 3 planes, one that carries luminosity, and two that carry color (aka ...
xenoid's user avatar
  • 20.6k
19 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

In addition to @remco's fantastic answer, I want to add why there are different codecs for (roughly) the same purpose. Codecs are designed to: Be lossless vs. lossy Encode fast vs. reduce filesize ...
flolilo's user avatar
  • 6,467
18 votes

What is the "optimal" file size of JPEG images with respect to their dimensions?

No. This is a wrong approach. File size in pixels, yes, has something to do with the final weight, but it is not the only factor. Make a test. Take a completely white file of the same 2400x600px, ...
Rafael's user avatar
  • 23.8k
17 votes

JPG and file sizes - BASIC facts for dummy

JPEG is an image format with lossy compression. This means, every time you save a modified JPEG image, its quality gets slightly reduced because the algorithms used for encoding and compressing the ...
Byte Commander's user avatar
14 votes

JPG and file sizes - BASIC facts for dummy

To simplify a bit, JPEG image compression splits the image into different frequency components and stores them separately. Depending on the compression settings, it also stores the higher frequency ...
Ilmari Karonen's user avatar
13 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

There are several reasons why this assumption is incorrect, and they all come down to one thing: What scale are you actually using? And that can be broken down a little further: What is 255? "...
mattdm's user avatar
  • 143k
11 votes
Accepted

Does the detail in an image affect how large the image file is?

This is not only possible, but extremely likely, when you're using a compressed image format such as JPEG. Data compression methods in general become more efficient as the data to be compressed ...
junkyardsparkle's user avatar
11 votes

Two EXACTLY the same .jpg images with one image more than twice the file size of the other - Why?

If the files are different sizes, the only way the image data can be identical is if the Exif data is different (an embedded thumbnail difference would be a place to start). Suppose there are two ...
Bob Macaroni McStevens's user avatar
10 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

If at the core, photos are just 3 channels of pixel values [0, 255] X RBG That is a seriously broken assumption and the rest of your question is simply not answerable without breaking away from it. ...
Peter Green's user avatar
10 votes

What is the "optimal" file size of JPEG images with respect to their dimensions?

Web developer here. Here's how I'd approach this: 1. Determine the displayed image dimensions and required screen resolutions. Your first task is determining what pixel sizes the images will be ...
nathancahill's user avatar
8 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

No, an image is not just RGB values in the range 0-255. Even if you ignore storage formats, there are many ways to describe color. Here are some examples: Red, green and blue components (RGB) Cyan, ...
Fax's user avatar
  • 211
8 votes
Accepted

Do high export resolutions compromise image safety?

An image doesn't have a DPI until you print it. All it has are dimensions in pixels. Anything else is simply an interpolation of one system to another in order to display on your screen... which is ...
Tetsujin's user avatar
  • 23.1k
7 votes
Accepted

Should I resize photos before or after image optimization?

The "ImageOptim" tool pulls together a bunch of other things, and in the case of JPEG files, the relevant thing is the MozJPEG optimizing encoder. If you use this encoder and then resize and save with ...
mattdm's user avatar
  • 143k
7 votes

Two EXACTLY the same .jpg images with one image more than twice the file size of the other - Why?

These are two different images, not of the same scene? For the same perceptual quality, some images compress better than others. Does one have a lot of smooth or blurred areas (like the sky without a ...
Peter Cordes's user avatar
6 votes

How to know if a picture has too many pixels?

To a very large extent, pixels don't matter - or at the very least, more pixels won't make things significantly worse. What does matter is the size of the sensor in each camera - the EOS 600D has an ...
Philip Kendall's user avatar
  • 21.8k
6 votes

How to resize images in place in Lightroom

Select the RAW photos, then do an Export. In the Export Location section, choose Export To: Same folder as original photo. Check the Add to This Catalog Checkbox. Select the file output options ...
MikeD's user avatar
  • 199
6 votes

What is the "optimal" file size of JPEG images with respect to their dimensions?

While @Rafael's answer has explained the JPEG compression ins and out, I will try to answer your web and upload problematic. Using an image in a website (for design or content) will dictate some ...
jihems's user avatar
  • 710
6 votes

Image properties for social media?

None of 1-4 matter. All the major social networks (definitely including Facebook, Twitter and Instagram) re-encode any uploaded photos with their own settings, optimised for their use case (reducing ...
Philip Kendall's user avatar
  • 21.8k
6 votes

Two EXACTLY the same .jpg images with one image more than twice the file size of the other - Why?

The problem is that we forget all of our digital files are made up of binary, but our computers obfuscate those details. We simply see in our file explorer that some whatever.jpg file was last updated ...
w. Patrick Gale's user avatar
5 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

Your premise is not wrong: any image can be represented using an N-dimensional array of finite values. Personally, I generalize that using discrete geometry instead of a matrix, but the essence is the ...
Fábio Dias's user avatar
5 votes
Accepted

What application can rotate a TIFF without re-encoding it?

It is possible and even trivial but I am not aware of any application to do that task specifically. There reason why the file size changes when rotated is that TIFF files are encoded losslessly as ...
Itai's user avatar
  • 103k
5 votes
Accepted

Image File Size Question

Your naive computation works on naive image formats (early BMP, TGA). However, most popular image formats use some form of compression, which can be lossless or lossy, and in both cases, the achieved ...
xenoid's user avatar
  • 20.6k
5 votes
Accepted

Does JPEG compression reduce actual image size?

Yes, and no :) I think the article is speaking about the image file size (in bytes), and not the image size itself (in pixels) which is indeed unchanged. But, to be accurate, one of the tradeoffs of ...
xenoid's user avatar
  • 20.6k
4 votes

Does the detail in an image affect how large the image file is?

This is absolutely normal. While the sensor always samples the same amount of data, the file does not need the same number of bytes to represent different images. The more details there are, the more ...
Itai's user avatar
  • 103k
4 votes

How can I automatically downsize images which have more pixels than needed for the actual resolution?

I have a lot of pictures from my smartphone or my sports camera that may just have too many pixels. Is there a software way to detect this overweigth and reduce it? Preferably command line on linux. ...
Caleb's user avatar
  • 31.7k
4 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

Bitmaps A bitmap (BMP) is essentially what you describe, an array of numbers that represent pixel colors. E.g. something like 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 Lossless compression Now, let's ...
Brythan's user avatar
  • 141
4 votes

Aren't all digital images ultimately just pixel values between 0 - 255?

Let's say it was true, that every pixel was just three numbers (red, green and blue) each in the range 0-255. Other answerers have started by (correctly) challenging that assumption, but for ...
jez's user avatar
  • 170

Only top scored, non community-wiki answers of a minimum length are eligible