VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Member coody's Avatar
    Join Date
    Jan 2005
    Location
    United States
    Search Comp PM
    I have a question about the relationship between the image width x height and file size. The image editor software usually resize an image by width x height such as 80 x 75 and so on. How shall I know the final file size after I selected the width and height? Is there any relationship between the width, height and final file size after compression?
    Quote Quote  
  2. There's really no way to know for sure because formats use different compression algorithms, the only one that is close to being linear is Windows Bitmap(BMP). JPEG for instance samples the photo and if it has little color or gradients it will have a small file size after compressing.
    Quote Quote  
  3. For uncompressed images the relationship is simple:

    width * height * bytes per pixel + a little overhead for the container

    For compressed images there is no simple relationship except larger frames tend to make larger files. But the amount of detail and noise in the image, and the settings used in the codec, can make a big difference. For example here are pair of PNG images:

    Name:  noise.png
Views: 2675
Size:  276.8 KB

    Click image for larger version

Name:	clean.png
Views:	1134
Size:	80.8 KB
ID:	8113

    Both are lossless PNG images. The first is 352x288 pixels and the file size is 287 KB. The second is 1920x1080 but the PNG file is only 80 KB.
    Last edited by jagabo; 11th Aug 2011 at 16:10.
    Quote Quote  
  4. Member coody's Avatar
    Join Date
    Jan 2005
    Location
    United States
    Search Comp PM
    Hi, jacoho! You gave an example and said “The first is 352x288 pixels and the file size is 287 KB. The second is 1920x1080 but the PNG file is only 80 KB.”

    When you selected the image size such as 352x288 pixels, you did not know the final file size 287KB until you actually saved the file, right?

    The hosting site always has the file size limits for the uploading. So I have to resize an image or compress video file to meet its file size limits. Does anyone have a good idea to know or estimate the file size before saving it or it is impossible to know the final file size until you actually save it? Right now, if the final file size is too large, I have to resize the image smaller and then save it to see whether it meets the file size limits. It is timing consuming and I have to test it several times. I really want to know the file size before save it so that I can control it.
    Quote Quote  
  5. Originally Posted by coody View Post
    When you selected the image size such as 352x288 pixels, you did not know the final file size 287KB until you actually saved the file, right?
    Well, the program I used said what the file size would be before it actually saved it. But before I started saving I had no idea what the file size would be (I knew it would be large because of the noise, and the other file would be smaller because there was no noise and little detail).

    Originally Posted by coody View Post
    The hosting site always has the file size limits for the uploading. So I have to resize an image or compress video file to meet its file size limits. Does anyone have a good idea to know or estimate the file size before saving it or it is impossible to know the final file size until you actually save it?
    For video it's easy:

    size = bitrate * running time

    For images all I can recommend is using a lossy codec like JPEG. Generally, for a given image, the more you reduce the frame size the smaller the final file will be.
    Quote Quote  
  6. Member coody's Avatar
    Join Date
    Jan 2005
    Location
    United States
    Search Comp PM
    Jagabo, what program do you use to resize/edit the image or video that can tell you the file size before you save it, by the way?
    Quote Quote  
  7. Ulead PhotoImpact -- version 6, over 10 years old! After selecting File -> Save As -> PNG:

    Click image for larger version

Name:	action.png
Views:	1625
Size:	123.6 KB
ID:	8116
    Quote Quote  
  8. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Originally Posted by coody View Post
    Jagabo, what program do you use to resize/edit the image or video that can tell you the file size before you save it, by the way?
    Photoshop's Save for Web option shows you the file size when you slecet a compression level. Find the right the compromise between quality and size, then save. Save For Web does jpg, gif and png.

    For video you can use any good bitrate calculator (I like Vcalc as a standalone tool). This is independent of your encoder.
    Read my blog here.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!