News for hackers. Stuff that matters.
Re:Impressive JPEG Recompression by seats on Tuesday August 30, 2011 @09:40AM (#2941372)
I once worked somewhere where we had a need to store and transmit lots of camera created jpegs in as efficient a manner as possible.

When working on this problem, I noticed that all digital cameras create jpeg with 422 sampling. This might be a religious topic for some, but I cannot see any visual difference between 4:2:2 and 4:2:0, even with high magnification or on physical prints as large as 30 inch height. Simply sub-sampling to 4:2:0 along with subtle tweaks to quantization tables and with little effort we'd bring a typical jpeg from 1-2MB down to 300-400KB.

We even did a series of experiments with people who look at photo prints all day and they could not reliably pick the 'recompressed' images.

The only reason I think people really hold on to 422 or even 444 is that when subsampling you can get nasty amplified errors if you are using two tools that sampling with different algorithms or from different siting (i.e. imaging if one tool picked odd lines and one picked even). Although the spec specifies siting, I think there are still people who do it wrong, not to mention there is still leeway for interpretation on how pixels are averaged for siting that is not on a pixel boundary.

Bottom line is that if you know exactly what you are going to do with the photo in the future you can compress a lot and quite easily with little risk. If you have a lot of unknown processing in the future, things can get dicey.

Re:Impressive JPEG Recompression by andrewvc on Tuesday August 30, 2011 @11:59AM (#2941977)
For those wondering about the differences between 4:2:2 and 4:2:0, check out http://en.wikipedia.org/wiki/Chroma_subsampling#4:2:0
Re:Impressive JPEG Recompression by nitrogen on Tuesday August 30, 2011 @05:05PM (#2943246)
4:4:4 sampling is necessary to preserve color distinction in screenshots (otherwise your icons and text may change color), but since very few photographs will have single-pixel color variation, 4:2:0 is usually sufficient. Don't get me started on 4:1:1, though... I'm glad to be rid of the chromatic curse that was miniDV.
Re:Impressive JPEG Recompression by brlewis on Tuesday August 30, 2011 @10:19AM (#2941522)
I started with this image: http://c.ourdoings.net/td/kg/7cj8d5l.jpg

It shrunk it 1.5x. I downloaded the _mini version and could see more artifacts in the rendering of some of the smooth surfaces.

Then I re-uploaded the _mini version to jpegmini. It shrunk it 1.3x. This shows that they are reducing quality, not just optimizing.

Re:Impressive JPEG Recompression by colanderman on Tuesday August 30, 2011 @03:48PM (#2942960)
Given that they claim to perform perceptual optimization, I would expect this. Human perception wouldn't come into play if they were just optimizing the image.
Re:Impressive JPEG Recompression by yatsyk on Tuesday August 30, 2011 @05:02AM (#2940649)
I've successfully converted 99% quality image which became 4.4 times smaller in size (identify shows 72% quality) after that I've converted same original image to 72% quality with imagemagick and I've got similar compression. Artifacts are look similar to jpegmini algorithm.

More interesting would be blind comparison experiment with with imagemagick compressed images with similar compression ratio. I'd be surprised if they could get 25-50% better compression with similar quality images.

Re:Impressive JPEG Recompression by nraynaud on Tuesday August 30, 2011 @05:45AM (#2940731)
"So far, 14 patent applications have been submitted for various technologies included in JPEGmini"

14 patents for one algorithm??? Somebody lost their mind, I worked on a camera lens that had 10 elements and less patents than that. Craziness.

Re:Impressive JPEG Recompression by Udo on Tuesday August 30, 2011 @06:11AM (#2940796)
I suspect those patents are designed to serve as a deterrent for anyone to enter the "JPEG optimization market".

Also, the service itself is underwhelming - it does next to nothing on JPEGs that are already optimized.

Re:Impressive JPEG Recompression by brlewis on Tuesday August 30, 2011 @09:57AM (#2941439)
That will work. Even just the possibility of patents has served to keep people out of that market:

http://en.wikipedia.org/wiki/JPEG_2000#Legal_issues

Re:Impressive JPEG Recompression by est on Tuesday August 30, 2011 @05:43AM (#2940725)
A comment from reddit:

http://web_design.reddit.com/comments/jdo4v/_/c2balp2

> barfolomew 13 points 20 days ago

> In my experience, one should stay away from Israeli tech startups. They're often very aggressive and fly-by-night operations. The culture clash between a north american firm is hard to deal with.

Is this really the case?

Re:Impressive JPEG Recompression by marcf on Tuesday August 30, 2011 @09:47AM (#2941399)
Some are, most aren't. There are scammers and hucksters everywhere. It is always easier to scam people when they don't really know you, a fact that can benefit foreign start-ups in the US market.

That said, regarding Israeli companies, I personally object to Israeli companies that operate from illegal Israeli settlements in the occupied Palestinian territories, such as SodaStream and Ahava Cosmetics. SodaStream is particularly bad in that it produces its goods using underpaid Palestinian labor but market's its products as made in Israel.

SodaStream details: http://www.whoprofits.org/articlefiles/WhoProfits-Production...

Re:Impressive JPEG Recompression by bradleyland on Tuesday August 30, 2011 @08:58AM (#2941203)
Fight generalization with generalization! When one encounters, "one should stay away from <race or ethnic group>", always proceed with caution.
Re:Impressive JPEG Recompression by Dylan16807 on Tuesday August 30, 2011 @09:28AM (#2941311)
While that is a reasonable policy, the statement in question is one of regional culture. Compare "silicon valley startups".
Re:Impressive JPEG Recompression by cema on Tuesday August 30, 2011 @06:11AM (#2940794)
Generally, no. But when one claims personal experience, how can a stranger judge?
Re:Impressive JPEG Recompression by pavel_lishin on Tuesday August 30, 2011 @11:33AM (#2941867)
By asking for more detail.
Re:Impressive JPEG Recompression by ck2 on Tuesday August 30, 2011 @05:13AM (#2940667)
Please add a non-flash alternative uploader.

I run as little flash as possible these days, security, tracking etc.

Aha! Look what I discovered:

http://www.jpegmini.com/main/shrink_photo?no_flash=1

There have been a dozen jpeg reduction attempts over the years, curious to play with this one. Lossless jpeg cropping fascinates me more though.

Re:Impressive JPEG Recompression by palish on Tuesday August 30, 2011 @07:01AM (#2940893)
Is such sorcery possible?
Re:Impressive JPEG Recompression by ashmud on Tuesday August 30, 2011 @12:35PM (#2942140)
Calvin Hass has several articles on JPEG, including lossless transformations. http://www.impulseadventure.com/photo/

Better JPEG sells a library, Photoshop plugin, and (relatively simple) standalone program that allow lossless editing (only changed blocks are recompressed). http://www.betterjpeg.com/

Re:Impressive JPEG Recompression by ZeroGravitas on Tuesday August 30, 2011 @07:23AM (#2940929)
You can crop and rotate JPEGs losslessly:

http://jpegclub.org/jpegtran/

Re:Impressive JPEG Recompression by StavrosK on Tuesday August 30, 2011 @08:15AM (#2941075)
Doesn't cropping have to be within a certain size, though?

EDIT: Yep, looks like you can only crop it along the DCT block boundaries:

http://www.ben.com/jpeg/

Re:Impressive JPEG Recompression by DarkShikari on Tuesday August 30, 2011 @01:26PM (#2942348)
If you want recompression without quality loss, try jpgcrush: http://akuvian.org/src/jpgcrush.tar.gz

It does some quite evil things with progressive Huffman coding that most people didn't even realize was possible.

Re:Impressive JPEG Recompression by anonova on Tuesday August 30, 2011 @10:24PM (#2943968)
I'd be interested in seeing how this works (source, docs, etc.), but unfortunately I can neither get jpgcrush nor jpegrescan to output anything.
Re:Impressive JPEG Recompression by danbee on Tuesday August 30, 2011 @09:09AM (#2941249)
This introduces noticeable artifacting for me. jpegtran -- run via the wonderful imgopt (http://lyncd.com/2009/03/imgopt-lossless-optimize-png-jpeg/) script -- did a better job with the image I uploaded, with no quality loss.
Re:Impressive JPEG Recompression by kilian on Tuesday August 30, 2011 @01:35PM (#2942391)
If you're looking for something similar but in GUI form, I made http://trimage.org for that, installable in Ubuntu via apt-get install trimage.
Re:Impressive JPEG Recompression by est on Tuesday August 30, 2011 @05:12AM (#2940664)
Another site from Sharon Carmel (the author based on WHOIS info)

http://iloop.co.il/

He/She is BeInSync founder and VP R&D

http://iloop.co.il/main_page/2009/9/14/we-have-a-dream.html

http://www.israelinnovation20.com/tag/sharon-carmel/

Re:Impressive JPEG Recompression by ZeroGravitas on Tuesday August 30, 2011 @07:20AM (#2940921)
Someone with that name posted to the WebP list about Jpegmini, they came across as a bit of a kook (though it could have been a language issue I suppose):

https://groups.google.com/a/webmproject.org/group/webp-discu...

Re:Impressive JPEG Recompression by vytis on Tuesday August 30, 2011 @05:06AM (#2940653)
Well the quality seems quite a bit worse for the picture I tried. Original: http://postimage.org/image/94ol50ck/, compressed: http://postimage.org/image/14712qgjo/ The resulting image has way less detail in higher frequencies.
Re:Impressive JPEG Recompression by ck2 on Tuesday August 30, 2011 @05:48AM (#2940740)
looking at the file names I think this is the compressed version http://s3.postimage.org/2qgfsekg7/Front_mini.jpg

I'd like to run it through errorlevelanalysis.com but their service seem to be down.

I suspect it tries to raise the brightness and sharpness of certain pixels before compressing it further so "important" elements stay in detail. What was done to your image though looks nothing like the quality of their examples for the ship, etc.

Re:Impressive JPEG Recompression by est on Tuesday August 30, 2011 @05:21AM (#2940679)
Looks like the compressed version is a bit sharper to me.
Re:Impressive JPEG Recompression by vytis on Tuesday August 30, 2011 @07:14AM (#2940914)
Sorry, I pasted the links in the wrong order. The original is this one: http://postimage.org/image/14712qgjo/ and the compressed image: http://postimage.org/image/94ol50ck/ File size was reduced from 4.4mb to 1.2mb
Re:Impressive JPEG Recompression by eftpotrm on Tuesday August 30, 2011 @05:25AM (#2940684)
If the compressed version is apparently sharper than the original file, that's an artifact surely? It might be pleasing in some contexts but it's not an accurate representation of the original file in that aspect.
Re:Impressive JPEG Recompression by est on Tuesday August 30, 2011 @05:28AM (#2940691)
I mean, vytis claimed that

> The resulting image has way less detail in higher frequencies.

But the compressed version actually exposes more detail.

Re:Impressive JPEG Recompression by waitwhat on Tuesday August 30, 2011 @05:43AM (#2940727)
But the compressed version actually exposes more detail.

No. It really doesn't.

It adds a couple of visual filters (brightening, sharpening) before recompressing, but these don't "expose more detail", but rather all three steps actually introduce additional errors. Errors that trick they eye into seeing a "better" image, but errors nonetheless.

Re:Impressive JPEG Recompression by sharoncarmel10 on Tuesday August 30, 2011 @08:02AM (#2941050)
JPEGmini does not apply any filters on the photo, no pre processing whatsoever. JPEGmini went through BT.500 certification, the result was that given 2 images 1. source 2. recompressed, the tester could not tell which is the source and which is the recompressed. Enjoy.
Re:Impressive JPEG Recompression by CJefferson on Tuesday August 30, 2011 @10:23AM (#2941541)
I'm not sure what BT.500 certification is, but I can certainly tell the difference on some (not all) images, when recomposed.

Are you attached to JPEGmini? If so, would you be willing to bet that I cannot tell if a photo of my choice has gone through your system and been compressed?

Re:Impressive JPEG Recompression by waitwhat on Tuesday August 30, 2011 @11:35AM (#2941874)
I'm on a 3G connection today, so relied on this thread for before/after images. Unfortunately, it seems that the original poster had labelled his photos the wrong way around...
Re:Impressive JPEG Recompression by MtrL on Tuesday August 30, 2011 @05:37AM (#2940710)
Think he might have got the links the wrong way round
Re:Impressive JPEG Recompression by leag on Tuesday August 30, 2011 @05:55AM (#2940759)
Custom quantization tables and chroma subsampling, with a bit of hype
Re:Impressive JPEG Recompression by biot on Tuesday August 30, 2011 @04:52AM (#2940631)
Wow, the Dropbox sample photo Costa Rican Frog was reduced 4.6x and actually looks sharper than the original. The detail in the middle of the back appears to have more contrast in the minified version. Other than some sharpness and some minor artifacts in the eye, the before and after images look identical. Except the original is 346KB and the JPEGmini version is 75KB.
Re:Impressive JPEG Recompression by CWuestefeld on Tuesday August 30, 2011 @09:45AM (#2941391)
looks sharper than the original ... more contrast in the minified version

That's not a good thing, to my way of thinking. When I'm processing my photos, I'm choosing very carefully the amount of sharpness and especially contrast in the image. I'd be very unhappy with a tool that alters these.

Re:Impressive JPEG Recompression by biot on Tuesday August 30, 2011 @02:15PM (#2942559)
It looks to be a per-image effect and not intentional. Most images I tried, there was no apparent difference. Then again, most images had only about a 30% savings. For an almost 80% savings, I'm not surprised if there's no free lunch.
Re:Impressive JPEG Recompression by userulluipeste on Tuesday August 30, 2011 @04:55AM (#2940635)
It's impressive, indeed! I guess they use some feedback loop when recompressing, because there doesn't appear to be no quality loss, even on the smallest details. I've tried one file of 1.4MB of an Australian nature landscape. Recompressed went under 400KB. I wonder if there isn't an offline tool available. For free if possible :)
Re:Impressive JPEG Recompression by pyre on Tuesday August 30, 2011 @05:34AM (#2940701)

  > there doesn't appear to be no quality loss, even
  > on the smallest details
I do not think that means what you think it means.
Re:Impressive JPEG Recompression by azulum on Tuesday August 30, 2011 @12:07PM (#2942022)
inconceivable!
Re:Impressive JPEG Recompression by est on Tuesday August 30, 2011 @05:58AM (#2940767)
two relevant papers

http://spie.org/x648.html?product_id=872231

http://spie.org/x648.html?product_id=872230

from SPIE Electronic Imaging 2011 conference in San Francisco

Re:Impressive JPEG Recompression by artursapek on Tuesday August 30, 2011 @05:56AM (#2940762)
Wow it looks like they've caught on to something. I've tried a few ~1.2 MB scans of film negatives and it shrunk the sizes 5x and 6x with no differences that I can see. When I tried smaller files however the difference got down to ~1.5x with some more obvious noise removal so I think it's just exploiting inefficiencies in how large jpg's are encoded.

I also love the sense of humor. "SEEMS YOUR PHOTO LOST SOME WEIGHT!"

Re:Impressive JPEG Recompression by cateye on Tuesday August 30, 2011 @05:56AM (#2940761)
I don't see the point. I upload a jpeg that is 51% progressive compressed in Photoshop and Jpegmini can reduce the size 1.2x.

Isn't really worth the effort.

Re:Impressive JPEG Recompression by swatthatfly on Tuesday August 30, 2011 @02:16PM (#2942564)
This would be interesting if it was not web service. I would like to have an executable with command line access, in order to run batch commands. I don't want my images stored/processed on their server. Surely they can think of a license price.
Re:Impressive JPEG Recompression by iaskwhy on Tuesday August 30, 2011 @05:02AM (#2940648)
A more web-ish example: a static jpg banner with 900x400 was 46KB and got compressed into 35KB (reduction of 1.3x). Another similiar banner with 43KB resulted in a compressed 29KB (1.5x smaller). This is very good!
Re:Impressive JPEG Recompression by rglover on Tuesday August 30, 2011 @09:06AM (#2941235)
Does what it says. Took a 1MB image and took it down to about 300kB. Only complaint is that you have to sign in (using Facebook/Google) or create an account to do batch uploads.
Re:Impressive JPEG Recompression by geuis on Tuesday August 30, 2011 @04:17AM (#2940563)
Every jpg image I try fails. This happening to anyone else?
Re:Impressive JPEG Recompression by Fast7 on Tuesday August 30, 2011 @04:40AM (#2940605)
No. I tried Windows7 Chrysanthemum.jpg under Sample Pictures folder, it works, impressively.
Re:Impressive JPEG Recompression by zobzu on Tuesday August 30, 2011 @05:40AM (#2940717)
64 bit browser + flash on Windows = fail for uploads use a 32 bit browser (like IE..) and see if it fixes it also, blame adobe
Re:Impressive JPEG Recompression by twidlit on Tuesday August 30, 2011 @04:51AM (#2940627)
Whoa! 1.15mb jpeg | 1.1mb imageoptim | 422 kb jpegmini
Re:Impressive JPEG Recompression by jmah on Tuesday August 30, 2011 @05:33AM (#2940699)
So far, 14 patent applications have been submitted for various technologies included in JPEGmini

Must be a good chunk of change behind it.

Re:Impressive JPEG Recompression by ck2 on Tuesday August 30, 2011 @06:30AM (#2940826)
I wonder if one could figure out the algorithm by making a specially crafted image and recycling it through their service several times to see what it does where.
Re:Impressive JPEG Recompression by TomGullen on Tuesday August 30, 2011 @06:20AM (#2940807)
This is great, shaved ~20% off my splash image, 100kb to 80kb with no noticeable loss of quality.

Good job!

Re:Impressive JPEG Recompression by silon on Tuesday August 30, 2011 @06:32AM (#2940832)
Ratio display needs to be fixed:

99k -> 71k is not usefully presented as 1.4x, but better as ~30%

Re:Impressive JPEG Recompression by sukuriant on Tuesday August 30, 2011 @06:37AM (#2940839)
Or 70% the size.
Re:Impressive JPEG Recompression by rorrr on Tuesday August 30, 2011 @05:11AM (#2940660)
Tried it. It just saves it with worse compression, resulting in more artifacts. Not impressed.

All these posts "whoa I compressed my 1MB image to 400KB" are laughable. It's not like it's lossless.

Re:Impressive JPEG Recompression by edrokov on Tuesday August 30, 2011 @09:01AM (#2941219)
You are very right, rorrr