
Show HN: Jpeg.io – Convert any major image format into a highly optimized JPEG - matylla
https://www.jpeg.io
======
projectsymphony
Has anybody tried mozjpeg?
[https://github.com/mozilla/mozjpeg](https://github.com/mozilla/mozjpeg)

It works _much_ better than _any_ of the alternatives listed here, I'm
surprised noone mentioned it yet.

Here is an image compressed to the same size with

mozjpeg [http://m8y.org/hn/12597098.jpeg](http://m8y.org/hn/12597098.jpeg)
jpeg.io [http://i.pi.gy/AP8v.jpg](http://i.pi.gy/AP8v.jpg)

~~~
bluthru
MozJPEG is especially impressive at reducing artifacts around text:

[http://calendar.perfplanet.com/2014/mozjpeg-3-0/](http://calendar.perfplanet.com/2014/mozjpeg-3-0/)

~~~
aluhut
> If you want to run MozJPEG on your own machine, then you’ll need to use an
> ugly command-line program.

:(

And I'm out.

~~~
TazeTSchnitzel
Command-line-only apps are typical of this genre of software (pngquant,
pngcrush, all the webp utilities, ffmpeg, etc.)

However, sometimes there are GUI apps which wrap the tool itself.

~~~
aluhut
There has been a request pending for it on the IrfanView forums for 3 years
now ;)

------
pwython
Did a quick comparison test with this beautiful piece of artwork I just
created.

original [http://i.pi.gy/0K7d.png](http://i.pi.gy/0K7d.png) (2.1 MB)

jpeg.io [http://i.pi.gy/AP8v.jpg](http://i.pi.gy/AP8v.jpg) (102 KB)

Photoshop 60% jpeg Export [http://i.pi.gy/Wr4P.jpg](http://i.pi.gy/Wr4P.jpg)
(90 KB)

tinypng.com [http://i.pi.gy/ndKA.png](http://i.pi.gy/ndKA.png) (74 KB)

Note pi.gy does not compress uploads.

~~~
wscott
Since he doesn't summarize the test above, let me. The jpeg.io result is
bigger than the other two and noticeably worse quality. The problems were with
the sharp lines.

Perhaps jpeg.io specializes in photo-realistic pictures rather than graphics
and logos.

~~~
dlbucci
jpeg.io may have lost on sharp lines, but it had WAY fewer artifacts than
either of the other exports, and the blue was closer to the original compared
to the Photoshop export. In my opinion, it's a better quality image.

~~~
CodeMage
Honest question: if I can't see the artifacts without zooming in, is there any
reason why I should care? Of all the conversion results offered, the Photoshop
export actually _looks_ the best to my eyes, so I'm genuinely trying to
understand why the jpeg.io result would be considered better quality in this
particular case.

~~~
dlbucci
I don't need to zoom in or even look that hard to see the artifacts. Maybe
that's me, or maybe that's the retina display on my MacBook, but that's why
jpeg.io looks the best for me. If you can't see the artifacts though, I would
say jpeg.io loses out.

------
Diti
I am pretty sure “Kraken.io's proprietery JPEG optimization algorithms” is
based on the Psychovisual Error Threeshold:
[http://ieeexplore.ieee.org/document/6530010/](http://ieeexplore.ieee.org/document/6530010/)

Have a read at what Google engineer Colt McAnlis has to show about it:
[https://medium.com/@duhroach/reducing-jpg-file-
size-e5b27df3...](https://medium.com/@duhroach/reducing-jpg-file-
size-e5b27df3257c)

------
kowdermeister
I was about to share it, but FB cached something crap:

[http://imgur.com/a/2yfDC](http://imgur.com/a/2yfDC)

I was about to refetch it for you, but the FB debug tool throw some error.

------
jarcane
Please stop using .io domains.

[https://gigaom.com/2014/06/30/the-dark-side-of-io-how-
the-u-...](https://gigaom.com/2014/06/30/the-dark-side-of-io-how-the-u-k-is-
making-web-domain-profits-from-a-shady-cold-war-land-deal/)

------
vog
From a technical point of view, this is a great way to collect more real-world
image datasets to test and optimize their algorithms against.

Moreover, from a business point of view, this is a great way to collect
pictures that are usually not published by other means (e.g. Flickr), but I
don't quite see how this could be exploited without copyright infringement.

~~~
kowdermeister
Look at the bottom, it's powered by Kraken.io. This service is just a nice
acquisition channel for them while providing something useful. I like these
win-win scenarios.

~~~
vog
_> just a nice acquisition channel_

My point was that it is _not just_ an acquisition channel, but also a great
way to collect more sample images for their algorithms.

~~~
tedmiston
I totally agree. I suppose the parent comment could be referring to customer
acquisition or acquiring real world sample image data.

------
mcjiggerlog
Really nice tool, but I'm not getting the best results in terms of size
optimization so far:
[http://i.imgur.com/2lfx3P8.png](http://i.imgur.com/2lfx3P8.png)

I guess "highly optimized" is a rather ambiguous term. Maybe add a slider for
quality <\------> compression?

~~~
VertexRed
Progressive jpgs increase the size

~~~
mcjiggerlog
For anyone else who also didn't know what progressive jpegs are -
[https://www.wired.com/2013/01/the-return-of-the-
progressive-...](https://www.wired.com/2013/01/the-return-of-the-progressive-
jpeg/)

~~~
VertexRed
When I was experimenting with PS a few years ago, progressive JPEGs were
always larger than baseline which is why I came to that conclusion.

This isn't however the full picture. To keep it short, baseline JPEGs are
usually smaller if the file size is less than 10 KB.

Useful article about progressive JPEG sizes:
[http://yuiblog.com/blog/2008/12/05/imageopt-4/](http://yuiblog.com/blog/2008/12/05/imageopt-4/)

------
Coffeewine
Has anyone gotten it to accept a webp image as input? It threw 'Error while
processing this file' for the ~10 files I attempted with. They were all
created with cwebp and the photo preset.

I was, of course, quite curious if it could improve upon file size, as that
was the main reason I was using webp in the first place.

~~~
ComodoHacker
Worked for me with a file from Opera Turbo. The result was about two times
bigger (as expected).

To make comparisons though, you shouldn't use webp as input, use original
instead.

------
guessmyname
Strange, I uploaded this PNG [1] and it came 14,917 bytes larger:

    
    
        $ ls -lhias
        -rw-r--r-- 1 root root  2845 Sep 28 07:58 colors.png
        -rw-r--r-- 1 root root 17762 Sep 28 07:59 optimized.jpg
    

EDIT: Disregard, it's because of the addition of the white pixels.

[1]
[https://gist.github.com/anonymous/de2f5f8e6ecb5881e1357ebaf4...](https://gist.github.com/anonymous/de2f5f8e6ecb5881e1357ebaf4954ea2)

------
Kiro
Cool. When would you want to use JPEG over PNG though? I don't know much about
these things (just using PNG/SVG everywhere).

~~~
barrkel
Any time it's a photographic image (rather than a drawing, diagram or
rasterised vector image).

~~~
jerrycruncher
This. Here's a quick guide:

JPG - Use for photographic images only.

GIF/PNG-8 - Use for line-art, logos, etc.

PNG-24 - This is a a lossless format/TIFF replacement and generally shouldn't
be used for production sites.

~~~
tedmiston
> PNG-24 - ... generally shouldn't be used for production sites.

But it is sometimes of course, particularly when the designer does not want
the PNG restricted to 256 colors. For example, suppose that your logo is a
single lowercase letter with an overlaid multicolor gradient rainbow, the
banding in the transitions becomes super pronounced in PNG-8.

Beyond that, SVG can replace _a lot_ of what PNG has been used for on the web
for the past couple decades.

------
mozinator
How do jpeg.io's proprietery JPEG optimization algorithms perform compared to
JPEG2000, webp or re-jpeg ?

~~~
astrange
Probably well against JPEG2000, which isn't actually that good. Wavelets look
bad when compressed because they blur so much.

JPEG will have a really hard time competing against WebP, x264 --tune
stillimage, or HEVC. Nobody uses those though.

------
blt
No privacy policy on the main or "About" page.

If you upload an image, who knows what the site operator will do with it?
Without any kind of limit spelled out, we must assume the worst.

OP, unless the main goal of this site is to harvest images from oblivious
people, please add a privacy notice.

------
SirKaliKook
So do these do anything different than making image magick available in the
browser?

------
the_duke
PDF support would be nice.

------
cmurf
What about openjpeg.org?

------
dvh
The amount of people in this thread who don't understand what is JPEG and PNG
for is staggering!

------
xycodex
no pdf?

~~~
Retr0spectrum
In what scenario would that be useful? I'm just curious.

~~~
nidu
Probably when you accidentally scanned a document to PDF. Or when you received
a document in PDF from some nasty man.

------
malinens
Cool. But I prefer tinyjpg or tinypng

~~~
fredley
Why?

------
omginternets
Forgive me, but why on earth would I want to use JPG in the age of PNG?

~~~
codazoda
Are you serious? A digital photo translated to PNG is going to be quite large.
PNG has it's place, for sure, but it doesn't compress photographs like JPEG
does. PNG is great for line art, solid color vector that has been rasterized,
etc. JPG is great for photos.

~~~
omginternets
>Are you serious?

Perfectly. I'm not very familiar with image compression and JPEG conjures up
images of pixellated atrocities.

It seems like either progress has been made in this domain or most JPEG
encoders on the internet are poorly configured (in which case the present
webapp makes sense).

~~~
jerrycruncher
I think it's more likely that a pixelated jpg is a result of the creator using
the wrong format (ie, using jpg where gif/png-8 would have been more
appropriate) or over-compressing the image.

PNG-24 is a lossless format, and generally shouldn't be used for production
sites.

