Jump to content

Observations regarding Imgur Image Compression


renault

Recommended Posts

Recently another member commented in my posting "Night Flight into Heathrow" that they experienced some difficulty in obtaining good image quality from Imgur for a sunset image that they had recently posted.

 

I got intrigued and decided to investigate further.  

 

In Imgur's information regarding upload limits they mentioned the following " Non-animated images over 1MB for anonymous uploads and 5MB for account holders will be lossily compressed"

 

ref: https://help.imgur.com/hc/en-us/articles/115000083326-What-files-can-I-upload-What-is-the-size-limit-

 

I decided to do a little experiment to see what actually happens and the results are presented below.

 

I hope that this is of interest and of course individual mileage will vary , so please use this as a comparison only for the images I used. My analysis was based upon XPlanes .PNG (Lossless compression) format, but I believe the observations are valid for other simulators as well.

 

Cheers

 

Renault

 

Summary:

 

From my own observations:

 

a) This particular image was selected because it is a difficult image to compress (the pattern on the roof can lead to "moire" patterns). Also it appears to me that the impact of image compression is

most pronounced when dealing with low light conditions or in conditions with wide variation in lighting conditions (deep shadows and bright sunlight) 

 

1) A good file compression for the images used is to compress as a .JPG at 75% image quality before upload. This minimized the file size while maximizing the number of unique colours in the image.

However it still reduced the number of unique colours by about 23%. Original file size (.PNG) was about 4.3 MB and was reduced to 239KB. The image is not altered by Imgur after it was uploaded

 

Based upon this observation I am changing my own protocol from what I had been using.  

 

However, the caveat I would add is that although the images presented are good quality and I think very acceptable (especially since Imgur is a free service) the original .PNG file on my machine has a "richness" in the subtle variation in shades and colours that are not present in the compressed images. (Small image in #9 below).

 

Although it is quite reasonable to expect this, it probably does depend on the particular image. My observation for pre compressing at the above setting is only based upon my observation that this worked best for the image I used  and was also the setting and image type that Imgur seemed to default to for any image much above an original size of 2MB or greater.

 

2) A file size significantly above the 1MB limit is converted by Imgur to a .JPG and compressed at 75% image quality.

 

If one didn't wish to compress their files below the limit before upload the following observation may be valid.

 

Since .PNG files are a lossless compression format I felt it was best to keep large file sizes in the .PNG (XPlane) format for uploading. It is possible to reduce the .PNG file size with compression without a change in image quality , but the best compression reduction I obtained with an iterative algorithm (PNGOUT plugin) was about 50%.

 

The advantage to using a compressed .PNG file is that since it is a lossless compression, the image quality is not potentially degraded until the Imgur upload (i.e. if you wanted to store it on your machine in its original image quality but reduce the stored file size  and still upload it). Please note that this file will still  will be altered by Imgur if it exceeds the above file limits when uploaded

 

Unless the file size is reduced below the 1MB limit, Igmur compresses the file as a .JPG at 75% image quality if the file size is significantly above 1MB/5MB or at a  image quality less than 100%  if it is slightly above the limit.

 

 However , the worst case potentially is to upload a .JPG file that has been reduced at less than 100% Image quality before uploading , but is still above the 1MB limit. for anonymous uploads or 5MB for account holders. Since .JPG is a lossy compression method the initial compression will have lost image information and then further lossy compression by Imgur would potentially degrade the image quality further.

 

Comparison:

 

1. JPEG 70% Quality , # of Unique colours - 43521, File size - 239KB

 

8gZ8aaF.jpg

 

2. JPEG 75% Quality, # of Unique colours - 43521, File size - 239 KB

 

oYVuGlQ.jpg

 

Quality Check: I then backloaded this image from Igmur. # of Unique colours - 43521, File Size - 239 KB
as per the original upload.

 

3. JPEG 82% Quality (Word Press standard), # of Unique colours - 42843, File size - 297 KB

 

pdU59AR.jpg

 

4. JPEG 85% Quality, # of Unique colours -  42564, File size - 331 KB

 

1IaBtox.jpg

 

Quality Check: I then backloaded this image from Igmur. # of Unique colours - 42564, File Size - 331 KB
as per the original upload.

 

5. JPEG 90% Quality, # of Unique colours -  41803, File size - 425 KB


Image not presented : No Visual Difference

 

6. JPEG 95% Quality, # of Unique colours - 39554, File size - 630 KB


Image not presented : No Visual Difference

 

7. JPEG 100% Quality, # of Unique colours - 36110, File Size - 1,322 KB (Exceeds anonymous upload limit)


Oofqrar.jpg

 

Quality Check: I then backloaded this image from Igmur. # of Unique Colours - 33482, File size - 491 KB 


File type : JPG at 90% Quality. However since .JPG is a lossy format it was interesting to note the loss of unique colours. Compared to the PNG original screenshot this is a reduction in unique colour information of 36.5% (My JPG conversion) plus an additional loss in unique colours by Igmur of 4.6% for a total loss of approximately 41% from the original screenshot

 

It is also a loss of information from the original .JPG (i.e. potentially not a good idea to "double dip"). Visually , though it is hard to discern any visual differences in comparison with other images, although compared to the original .PNG file there is a loss of visual "richness" especially in the sunlit areas on the ground and in the subtle colour variation in the sunset sky colours.

 

8. PNG (Lossless Compression), # of Unique colours - 56913, File Size - 2394 KB (Exceeds anonymous upload limit)

 

Unfortunately this is not the ORIGINAL Image as Igmur compressed it as a .JPG file - comment below

kWMhqx0.jpg

 

Quality Check: I then backloaded this image from Igmur. # of Unique colours - 43521, File size 239 KB
File type: JPG at 75% Quality

 

9. PNG Original No Compression, # of Unique colours - 56913, File Size - 4,177KB (Exceeds anonymous upload limit)

 

I manually successively reduced the original by 1/2 several times to bring the file size down. Although it is now quite small, the colour control in the original is retained ( # of Unique colours is still 56913). File size is now 295KB and image size is 480 x 270 (Original was 1920 x 1080). This was not altered by Igmur when it uploaded

 

JyxIc9k.png

 

Unfortunately the image below  is not the ORIGINAL PNG Image as Igmur compressed it as a .JPG file - comment below


6rHURqa.jpg

 

Quality Check: I then backloaded this image from Igmur. # of Unique colours - 43499, File size 238 KB
File type: JPG at 75% Quality
 

 

Link to comment
Share on other sites

Very useful stuff - many thanks for all the hard work!

 

I've found that finding a free image hoster that doesn't mess with your original really hard to find. I've been using Postimage for a while, but the procedure to get the full size image link is slightly complicated (but at least it works and it's free). Not sure about the maximum filesize it accepts though.

 

I'm lucky enough to own Photoshop (for my day job) which has good interpolation routines and, as far as I can see, I can get reasonably good images going from PNG to JPG with only slight loss in detail or colour - generally trying to keep a fairly standard image of 1350px wide (for forums) and 200-300k in size. With Photoshop you have a live preview and can see what the compression ratio is doing before you save.

 

However - reading your notes, I may experiment with PNG a little more.

 

Adam.

Link to comment
Share on other sites

  • 5 months later...

I will share my experience in image optimization ... At first, I had to manually compress all the pictures through Photoshop. The most free option by the way (except for the cost of a license for Photoshop). But this process takes a lot of time if there are more than 10-20 pictures on the site. After all, each picture must be manually processed, and then upload on the site again. Tedious such a process ... Now I use this service - https://optipic.io/ It saves a lot of time) It works by itself - automatically - only 1 time it needs to be connected to the site. Google is satisfied)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...