How to compress JPEG pictures to save space

Hi,

My Web App is hosted on a cloud server and I will have to store my clients pictures for later use. They use JPEG pictures taken with drones equiped with cameras. They stake a lot of pictures, terabytes/year when they are kept at full resolution (10 Mo/picture). I evaluate that each company using my web app will need 1,5 To/year of storage space. If I consider an extra storage price of 0,1$/Go/Month, Storing 1,5 To / year is would cost $1 800.00 (This is for full size pictures)

I did some tests to compare Photoshop and a tool called Squash(OSX). While reducing image size with Photoshop reduces image weight (50% reduction), the quality loss is noticeable. The full size image was 8,6 Mo and 2,9 Mo after the 50% size reduction.

On the other hand, Squash does reduces the picture size at 2,7 Mo but almost without quality loss. Squash could even do better with more agressive settings.

Both methods represent a 66% size reduction and a 66% cost reduction. I would have to store only 500 Go/year and it would cost $600.00 instead of $1 800.00

As far as I know, saving a picture with Xojo as jpeg while reducing its’size should give the same result as the one I get with Photoshop. Right?
I don’t think that the quality obtained by reducing the size of the picture will be acceptable for them.

I want to compress the pictures they will download and store them with the best quality possible at the lower cost possible. Any idea? Is there any algorithm I could use that would result in results similar to those I got with Squash? Is there any other way to solve the situation?

Thanks!

Xojo’s reduction is not very good. Actually probably worse than Photoshop. There was a long thread about that with comparisons two years ago or so.

You may want to look into MBS plugins. Christian has packed some very nifty graphics packages, and I would not be surprised if one of them offered the kind of features you are looking for.

Something like http://monkeybread.eu/MBS-FileMaker-Plugin-Examples/GraphicsMagick/Reduce%20Image.shtml

There are some third-party CLI apps that allow aggressive lossless (more or less) compression of image files. I can’t think of them off the top of my head, but if the Xojo methods aren’t enough you might want to look in to those. Maybe pngquant? Given the choice, I’d likely go with MonkeyBread, though.

That depends, I’m not entirely sure if you’re talking about the Quality setting on a JPEG or if Photoshop has it’s own compression tools. If you’re talking about saving the JPEG with a lower quality from Xojo then I would advise against it. The setting is named “quality” and not “file size” for a reason.

Squash (don’t recommend it, use ImageOptim) uses compression techniques on the JPEG that are not the same as adjusting the quality. Some companies even claim to have a proprietary compression algorithms better than the open source ones available in ImageOptim. I have never personally seen proof that they really are.

I don’t even have to know your customers to know that it wouldn’t be. It wouldn’t be for anyone. There’s no point in storing an image at full resolution if you’re just going to destroy the quality.

Don’t host the images yourself. Offload them to AWS/S3, and serve them from there for MUCH better pricing. This will also relieve some stress from the server running the app.

You may be able to employ a command line image compression tool through your web app. Most are considered lossy, but it’s not the same drastic effect you notice when changing the quality of a JPEG. I would start by poking around with ImageOptim and it’s freely available source code.

There is a lot of research to be had with image compression. Our local @Sam Rowlands has an image compression app. Mayhaps you could license technology from him?

Well thanks a lot for the advices. I will take a look at what AWS/S3 has to offer. Ideally, I will be able to store the pictures at full resolution.

I’ll post infos later.

Thanks again!

For those who have interest in the matter, here is the scenario I submitted to Amazon. I’m waiting for their response. Feel free to take a look at the calculation result I got from AWS calculator. Just follow the this link to my AWS calculation . Any feedback is welcome.

Submitted Scenario
[i]We have a web app that is allowing users to store Hi-Res Pictures. I need help to evaluate the monthly or yearly cost for an average user. I used the calculation tools you provide and tried to simulate the average user utilization of the storage services. I would like you to indicate me if the calculation I made is representative of the following situation.

Please consider that the web app and it’s database will run on a distinct cloud server out of AWS. AWS will be used to store pictures only.

The situation described here is susceptible to be repeated many times through between April and December by the same client. Nevertheless, I want to evaluate a unique event so I can extrapolate to every specific client volume need.

Here is the description of a unique event :

1- The user will collect 4500 hi-res pictures (10 mb/picture) over 1 to 3 days and download them through the web app and store them on the server.
2- A low-res copy (100 kb/picture) of each picture will be created and saved on the server as well
4- Each low-res picture will be viewed approximately five times during the year.
4- Each hi-res picture will be viewed through the web interface approximately twice during the year
5- Each hi-res picture will be downloaded approximately twice during the year
6- The year after, these pictures should exceptionally be used.
7- All pictures need to be archived but stay available even if they might never be viewed anymore…
8- I would like to be able to determine the storage use for each and every client.

Here is the link to the calculation I got from the AWS tool : http://calculator.s3.amazonaws.com/index.html#r=IAD&s=S3&key=calc-1B93230F-2E0F-4FEE-9FB1-213A2312B881

I would be grateful that you take a look at both the situation I describe and the calculation I made. I will listen to any advice you might have regarding the implementation of my web app and storage.

Thank you very much.[/i]