JPG Compression : Best Practises

Any other tech-related topics
Post Reply
Message
Author
User avatar
avi-aryan
Posts: 119
Joined: Tue Sep 03, 2013 8:31 am

JPG Compression : Best Practises

#1 Post by avi-aryan »

Just wondering, what should I do to have the minimum size + reasonable quality .
:D

User avatar
Midas
Posts: 6905
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: JPG Compression : Best Practises

#2 Post by Midas »

My experience tells me that for anything but thumbnails, anything bellow 85% compression is a shot in the dark -- that is, highly likely to make artifacts appear... YMMV. :mrgreen:

User avatar
avi-aryan
Posts: 119
Joined: Tue Sep 03, 2013 8:31 am

Re: JPG Compression : Best Practises

#3 Post by avi-aryan »

It is generally said that JPG is the best format for compressing images however I find that there are some images in .png that when making a JPG counter-part of them consumes even more size.
Take a look at this picture (10.4 kb) --
10.4 kb
10.4 kb
Image.png (10.4 KiB) Viewed 14189 times
The above PNG was created by Evernote .

I tried to create a JPG with same quality and of lower size but what I only was able to achieve was 26 kbs , about 2.5x larger.

User avatar
Midas
Posts: 6905
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: JPG Compression : Best Practises

#4 Post by Midas »

I'm not an expert in image file optimization, but that image of yours appears to have a narrow color palette -- that may just be the critical factor here...

BTW, I favor PNG for everything but widespread format compatibility.

User avatar
SYSTEM
Posts: 2045
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: JPG Compression : Best Practises

#5 Post by SYSTEM »

avi-aryan wrote:It is generally said that JPG is the best format for compressing images however I find that there are some images in .png that when making a JPG counter-part of them consumes even more size.
JPEG is good only for photos. For screenshots or small art (icons, sprites, logos and so on), PNG is much better.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
avi-aryan
Posts: 119
Joined: Tue Sep 03, 2013 8:31 am

Re: JPG Compression : Best Practises

#6 Post by avi-aryan »

SYSTEM wrote:
avi-aryan wrote:It is generally said that JPG is the best format for compressing images however I find that there are some images in .png that when making a JPG counter-part of them consumes even more size.
JPEG is good only for photos. For screenshots or small art (icons, sprites, logos and so on), PNG is much better.
You are right, thanks :mrgreen:

User avatar
avi-aryan
Posts: 119
Joined: Tue Sep 03, 2013 8:31 am

Re: JPG Compression : Best Practises

#7 Post by avi-aryan »

Just used the Save for Web plugin in IrfanView and I am really surprised with the results . PNG was almost 3x better than JPG. Thanks again :D

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: JPG Compression : Best Practises

#8 Post by tproli »

I always use the RIOT plugin for IrfanView.

Note that
http://luci.criosweb.ro/riot/download/ wrote:Special notice to IrfanView users
IrfanView has bundled into the plugin collection the Lite version of the RIOT plugin.
Here you can find the extended version (also FREE) that goes beyond Lite version offering extended functionality.
Occassionally I use PNG Optimizer to further reduce PNG size, it can do magic sometimes.

Btw, you need to know differences in jpg/png/gif and decide which format to use to get the lowest file size.

User avatar
avi-aryan
Posts: 119
Joined: Tue Sep 03, 2013 8:31 am

Re: JPG Compression : Best Practises

#9 Post by avi-aryan »

The Export for Web in Irfan View and the RIOT program are the same thing. However I will use the RIOT program as Iview uses a Lite version of RIOT (as tproli said)..

@tproli
The Png Optimizer looks nice and performs well . Reduced Clipjump's animated GIF from 143 kb to 88 kb.

User avatar
webfork
Posts: 10836
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: JPG Compression : Best Practises

#10 Post by webfork »

I know I've seen some great JPG compression suggestions out there, but I'll just talk about some of the things programs on the site can uniquely provide:
  • Delete meta-data that can include a lot of extra garbage, as well as privacy-harming info. I generally use FileOptimizer, Stripper, or ExifViewer for this task.
  • Avoid relying on standard settings (e.g. 90% quality). I strongly recommend the use of RIOT (or similar program) to gradually lower the bar until you can start to see artifacts. Your compression level can change as much as 10-20% from one image to another (even on similar images). I've been able to get the bar as low as 50 on some graphics (as Midas suggested it's usually thumbnails) without a noticeable difference.
SYSTEM wrote:JPEG is good only for photos. For screenshots or small art (icons, sprites, logos and so on), PNG is much better.
Agreed and -- just playing with RIOT -- you can see the difference in compressing image captures from PNG vs. JPG. It's a dramatically better quality to size ratio. For files that are going to be downloaded thousands or millions of times, you really want to put PNG files through heavy (slow) compression that FileOptimizer and similar programs can bring. For most others, you're probably better just using PNGOptimizer as tproli suggests (fast and effective).

User avatar
avi-aryan
Posts: 119
Joined: Tue Sep 03, 2013 8:31 am

Re: JPG Compression : Best Practises

#11 Post by avi-aryan »

@webfork
I am using RIOT since a week or so and am really impressed with what it can do . It has got a clean and sufficient interface and does its job better than I can imagine.

robertcollier4
Posts: 39
Joined: Fri Apr 12, 2013 3:20 am

Re: JPG Compression : Best Practises

#12 Post by robertcollier4 »

Anyone have any experience on how RIOT compares to Adobe Photoshop's "Save for Web" ?

User avatar
webfork
Posts: 10836
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: JPG Compression : Best Practises

#13 Post by webfork »

robertcollier4 wrote:Anyone have any experience on how RIOT compares to Adobe Photoshop's "Save for Web" ?
Not recently, no. I do prefer it to Photoshop CS3's save for web system, which involved a 4-pane preview. I think RIOT does it better, but I would like to go back and test them side by side.

Post Reply