PDA

View Full Version : Automatic Jpeg compression


The late XV105
15th Oct 2010, 10:52
Background:
For reasons of reliability I have recently switched backup tools. Given that I do not need encryption, a nice side effect is that whilst the backups in question are still net change (so fast and near real-time, with full backups being taken periodically via separate means), they are also now a simple file copy, including structure. In other words I get a "plain" copy of the source that acts and looks identically. No encryption or funny control files beyond an XML master file at the same level as the root. This is working with total success.

Question:
Do any PPRuNers have experience of a Jpeg compression tool that can be run automatically when a file is received in a given location?

Reason:
In addition to my backups I currently maintain on my networked NAS a copy of my entire Jpeg photograph library in compressed format (typically 1280x1024 at 100kb per photograph). This is done for ease of on-demand e-mailability and swift next-next-next loading when browsing on my wife's 802.11g netbook. I will now use the new net-change "backup" tool to maintain this directory automatically but currently will still have to manually initiate compression. This is very easy using the excellent picture resizer from rw-designer.com to recursively scan the entire structure and batch compress where required, but the purist in me doesn't like that the HDD gets used for a full scan when in reality only a handful of files out of many (currently over 20,000) have changed.

TVM,
XV

tailstrikecharles
15th Oct 2010, 12:18
furthermore, the compression is a lossy compression, meaning data is thrown away as the file is shrunk.

bnt
15th Oct 2010, 22:02
I know ImageMagick (http://www.imagemagick.org/) can do JPEG resizing and compression from the command line, and some folks use it to shrink images automatically for websites and so on. When it comes to backups, however, I save the originals, even if they are RAW files at over 10MB a pop. (You never cut a negative! :8 )

The late XV105
16th Oct 2010, 11:04
Thanks, Both, but I have been misunderstood.

tailstrike - As a pretty serious amateur photographer since the dawn of time, and a digitial one for rather long too, I know very well that Jpeg is lossy. :)
I happen to shoot in Canon's .CR2 RAW format and then convert to Jpeg when I'm done for ease of viewing and to save storage space. Even then, I still keep the RAW files for important events.

bnt - Thanks, I will look at the software you suggest. Note though that I am NOT compressing backup photos. Please re-read my post. I have a four level backup plan that involves a NAS (hidden in an outbuilding for the record) as well as off site rotation of the e-SATA and USB devices. My compression need is ONLY for ease of e-mailing (much easier to have an entire collection to hand, already compressed, than to do it per e-mail) and for speed of browsing with my wife's 802.11g netbook (full size originals take several seconds to load, making fast browsing impossible, whereas 100kb copies look just as good on the pixel-limited screen and load in a flash)

Bushfiva
16th Oct 2010, 13:41
Perhaps dropresize does what you want.

The late XV105
16th Oct 2010, 22:08
Thanks, Bushfiva.

Seems to do *EXACTLY* what I want so I will give it a try forthwith! :ok:

Will report back...

The late XV105
18th Oct 2010, 13:06
Will report back...

A courtesy update to say that my promise is not forgotten. I just have too much work to do of the kind that puts the roof over my head. Tool downloaded but not tried, yet.

The late XV105
19th Oct 2010, 20:47
...and the verdict is that it works perfectly... so long as the folder(s) being watched are on the host PC, not over a network like mine are :(

Thankfully though, there are two easy workarounds :)

One is to use the "run application after compression" option to invoke the DOS "move" command and the other is to move them via third party utility. I have now done the latter having used Dropresize's option to add a suffix after compression since I then have an easy way of knowing when a file has been compressed and so should be moved.

So far, so good.

Thanks for the steer, Bushfiva.

XV

IO540
20th Oct 2010, 09:52
Interesting thread...

I do fairly regular aviation trip writeups, and each camera image is cropped as required and then I usually generate two images: one at 8" wide 72dpi and the other at 8" wide 144dpi.

I often wish I had an automatic means of generating those two images. I am sure Photoshop can do that using its automation facility... I have used that a long time ago to convert thousands of 100MB TIFFs (from a Nikon slide scanner) into 5MB Jpegs.

Mad Monk
20th Oct 2010, 19:33
Hi XV105,
I too have been snapping for eons and have been using the 'New Digi Stuff' for some time.
My query is how much compression / space saving do you find this has given you ? Given that a JPEG is, as said, compressed.
I tend to keep all original/RAW files on a dedicated external drive but one can not keep growing drives. A long term, offline, solution seems to e the way to go.

Regards, MM.

P.S. I run a D3.

The late XV105
22nd Oct 2010, 20:37
No lesson in how to calculate pixel count here or its relevance to a computer screen size; plenty of websites exist that do a fine job.

Remember that the primary reason I make compressed copies of an already compressed Jpeg is for ease of e-mailing. Here, the extra "compression" I am talking about is actually a combination of resizing and sacrificing some quality (removing detail). This is because absolute quality is not important for the casual viewing performed on e-mailed photos to friends and family, but being able to cram a ton of photos in to a single e-mail without killing someone's in-box, is. A fair amount of quality loss is therefore acceptable so long as the photo still looks "nice" on screen; reasonable colours and textures, no easily seen pixelation, and no huge black borders around the edge when seen native size. I have chosen a default "long edge" of 1280 pixels since this will reasonably fill large monitors without being too wasteful on tiny ones of lower horizontal pixel count than this. In this case Jpegs that start out at 6-11 MB end up between 90 and 150 kb depending on the amount of detail in the photograph. A massive reduction. This file size is much the same either using the "RW" tool I mentioned above that I have been using for batch compression or the XP Powertoy Jpeg resizer.

Another reason for compressing is the speed of 802.11g WiFi browsing (through that massively lower file size) that I mentioned. It's my wife that does this most often and she is running a Asus 1000H netbook with 10" 1024x600 pixel screen of distinctly average colour and texture rendering ability. Here, those teeny weeny resized photos with a ton of detail removed look indistinguishable from the massive originals. On my HD 1920x1080 monitor of course they look poor compared to the the originals, but this is an irrelevance!

If you are using MS Windows and have similar needs to those described above, download the Power Toy suite from here (http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx) and try the image resizer. It works from right mouse button in Windows Explorer.

HTH