Napioa - Wind Origins

Napioa - Wind Origins
by octopus                

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.

Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2,300+ pictures that I want to transfer to my phone but on their original size they take up a lot of space (6.44gb) I would like to trim is down to without sacrificing quality or resolution. I know it can be done under linux with something like pgncrush. I currently have access to a windows system and all the files are on jpeg format.

How do I do it?

share|improve this question
    
Will the copies of the images on the phone only be viewed on the phone's screen, or will you want to print/share them from the phone to some other display? – Edd Dec 14 '12 at 12:14
2  
The term "TANSTAAFL" comes to mind here. You can run all of these Linux utilities in Windows with a little work. But in general, they're either going to give only a small savings or else require a reduction in resolution or image quality. – mattdm Dec 14 '12 at 12:17
1  
That's not a duck, that is a swan! – Steve Kemp Dec 15 '12 at 10:12
1  
You should always have enough reputation to answer your own question. This answer will probably earn you more reputation. – ChrisF Dec 15 '12 at 11:25
2  
Be aware that uploading to (your favourite image host here) may be affected by them recompressing the image for you, which may make comparisons futile. – Rowland Shaw Dec 17 '12 at 12:23

You need to "compress" the folder - There are various ways to do this - the classic one being to "Zip" them.

In windows (XP onwards) right-click on the containing folder, click "send to" then "Compressed folder"

This should reduce the size of the folder, and save it as a .zip file.

HOWEVER - Jpeg files are already compressed in their own encoding - so the final compressed file may actually not be much different at all.

share|improve this answer
    
If I zip them I won't be able to view them on my phone where I will be transferring them. I know there are way to do it individually. I need a way to do it in one go. Preferably under windows. – bran Dec 14 '12 at 11:14
    
Ok I see - hmm, if they must be kept as jpg's, without sacrificing quality or resolution I don't think you are going to be able to do it. If you are willing to lower the quality SLIGHTLY so that the difference is not obvious, then you could easily save a good amount of size. – Digital Lightcraft Dec 14 '12 at 11:18

Let's begin with a notion: compressors are able to reduce the size of something (like a text file) by processing it and representing the same information using less symbols. It's the way Zip makes a text-file smaller. This is lossless compression.

Pictures and audio (and, so, video) uses a very big ammount of information: for example, a 5 megapixels picture, in a format that does not compress anything (like TIFF) would take 5 megabytes x 3 colors *RGB) = 15 MB of space.

To reduce the file size, JPEG format makes you loose some information from the picture: be it quality, colors, etc. That's why you can open a JPEG in some photo-editing program (Photoshop, Gimp, etc) and then save it with less quality: it will use less information to represent your image, with a smaller file size, but will loose some quality. If you (or any person) will be able to notice the low quality is a important point when choosing "how much compression" you want.

So: in general, for pratical purposes, you will loose a lot of quality to reduce the size of a JPEG picture, because it is already compressed.

But you want to use that in your cell phone, that's right?

You didn't say which cell phone you have. Let's assume that you have a Samsung galaxy s3. You can see it's specifications: the screen resolution is 1280x720 pixels.

So, when you view a picture in it, it doesn't matter the original picture size: you'll be able to see 1280x720 pixels, because that's the maximum ammount of pixels that the cell will be able to show.

If you take all your pictures, resize them to 1280x720 pixels, and open in your phone, you will see them the same way you would see them with the original resolution. You will be loosing "resolution" from the original image, but it's something that you wouldn't be able to see in your phone anyway...

How yo do that in Windows: use any program you like that is able to edit pictures: Photoshop, Gimp, IrfanView... but since you're talking about doing it in a large amount of files, probably you're thinking about ImageMagick or a similar program, that can perform the same operation in a large amount of files.

Edit: to do it with Imagemagick:

1 - copy all your pictures to a new folder (ex.: Temp1), to avoid loosing the originals

2 - create a new folder where your pictures will be after being resized (ex.: Temp2)

3 - open a cmd window, go to the directory that have the copied pictures (Temp1)

4 - type:

mogrify -path full_path_to_Temp2 -resize 1280x720 *.jpg

share|improve this answer
    
This is what I was looking for. You also guessed my phone right, its an S3. I ma downloading imagemagick right now. what would be the command resize the images of all files in one folder to 1280x720? – bran Dec 14 '12 at 12:04
    
On wordpress I use a plugin to automatically resize images uploaded It uses a server side utility called littleutils (sourceforge.net/projects/littleutils) I wanted to use something like that. Which makes me believe that it can be possible to compress jpeg farther without losing much quality or reducing resolution. Currently most of my images are 2305x3072 or 2592X1944. – bran Dec 14 '12 at 12:11
1  
I found this on linux manpagez.com/man/1/opt-jpg – bran Dec 14 '12 at 12:14
2  
oh, so you ARE willing to sacrifice resolution? – Digital Lightcraft Dec 14 '12 at 12:19
3  
While I agree with everything said here, I'd like to point out that while many people show photos on their phone, they also like to zoom to show parts of the picture in more detail. If you do this but have downsampled your image to just the resolution of the phone screen, you WILL notice the difference as you are now showing a smaller region at the phone resolution, but you have already lost those pixels. Just a thought. – im so confused Dec 14 '12 at 16:24

You can use a program called Moo0 Image Sizer, which allows to resieze many images at once (as of 15 dec 2012, the available formats are jpg, png, bmp and gif).

The program is free for non commercial use.

share|improve this answer
    
Hi there E. Fisher, welcome to the site. It would be useful, I think, to flesh out your answer with some more, and confirmed, detail. – John Cavan Dec 14 '12 at 19:20

File size, quality, resolution - pick any two.

If you had images in an uncompressed format like BMP, then you could make them a bit smaller without sacrificing any quality or resolution by saving them in a compressed format that doesn't do lossy compression, like PNG-24.

JPEG images are already compressed, so with the given quality and resultion they are already as small as they can be. So, if you want a smaller file size you have to sacrifice quality or resolution.

As you are going to show the image on a phone, you might be able to sacrifice a bit of quality without getting any noticable difference. If the JPEG images are saved at quality 100, you could try making a copy using for example quality 80, and see if that is good enough for your needs.

If the resolution of the images is higher than the resolution of the screen on your phone, you would only use that extra resolution if you zoom into the image. In that case reducing the resolution would only limit how much you can zoom.

share|improve this answer
    
sometimes zipping or rar'ing them can squeeze the jpgs a bit more. – Michael Nielsen Jun 13 '14 at 15:20
    
@MichaelNielsen: Then it's probably because it contains some metadata that is not compressed, so saving the image without metadata would make it even smaller. – Guffa Jun 13 '14 at 17:20
    
it would be really stupid to strip the metadata in your own database. – Michael Nielsen Jun 13 '14 at 20:36
2  
@MichaelNielsen: Yes, but you are missing the point. The metadata is the reason that there is any compressable data in the file. – Guffa Jun 13 '14 at 20:56
up vote 0 down vote accepted

I have found the answer I was looking. The answer is opt-jpg for Linux. I didn't find it on ubuntu repository. So you have to download the source of littleutils (http://sourceforge.net/projects/littleutils/) which has opt-jpg included.

To install from source. Download the Tar with wget and:

tar jxvf littleutils-1.0.27.tar.bz2 && cd littleutils-1.0.24

...

./configure --prefix=/usr && make && make install && make install-extra

You have to be root so sudo su

I used a duck image for example. The un-optimized file is 1.1M after optimization its 991kb without losing any image quality (to naked eye) or changing the resolution of the image. It might not seem like huge difference (a reduction of 108kb) but with 2300+ images and 6.44gb size on average with the same size reduction can add up to a lot of space. enter image description here

You can see the original Duck image uploaded to flickr: enter image description here

And the optimized one: enter image description here

Can naked eye tell the difference?

As for how much space I actually saved. You will have to wait some time because I will have to let it run when I am not using the comp. This will take a while and I will remember to report back.

share|improve this answer
    
Apparently I have limitations in posting images and links. So maybe someone with more points can edit this? – bran Dec 15 '12 at 10:42
    
Just to update on people on how much space I saved. It took about 25 minutes for it to finish and I saved about ~200MB in size. – bran Dec 17 '12 at 10:26
1  
So, a 3% savings overall? – mattdm Dec 17 '12 at 12:06
2  
As an aside, you do know that is a swan, and not a duck, right? – Rowland Shaw Dec 17 '12 at 12:19
1  
The naked eye can't tell the difference when you reduce the resolution to match the phone, nor if you were to drop the quality from 12 to 8. Those two things together would save you %75, not 3%, of your file size, bringing the whole collection under a gig, with no way to tell without zooming in. (Not sure what quality setting those were originally saved as, but you can usually get an HD size image down to 250kb or so and still look great). – wedstrom Apr 19 at 15:36

You can obtain lossless optimization (based on optimizing the Huffman tables). The utility jpegoptim provides this algorithm.

Install it with (on debian):

apt-get install jpegoptim

To run a simulation (no action mode):

jpegoptim -n -p dsc07844.jpg

returns:

dsc07844.jpg 3872x2592 24bit Exif  [OK] 3057132 --> 2518805 bytes (17.61%), optimized.

To optimize:

jpegoptim -p dsc07844.jpg

It preserves the exif metadata

share|improve this answer

Ah, well you answered yourself, but changed your requirements. "No loss of quality" and "no loss of quality to the naked eye" are vastly different with images.

Also, PNGcrush and opt-jpg work completely differently; only noting this because you mentioned PNGcrush in your OP. PNGcrush only optimizes metadata about the image, not the image itself. This is why you typically only gain 1-2%.

Frankly, as to the two images in your answer, they do look completely different to my eye. The optimized image is much more washed out and has less black-depth. Since it's a JPEG, this was likely done by condensing the palette, which will make the image look... different.

The answer to your original question is that you cannot reduce file size significantly without affecting some kind of quality (except for the earlier mentioned 1-2% savings by metadata or tag compression.) i.e., by removing EXIF data, et cetera, depending on the format of the file (RAW, TIFF, JPEG).

To reduce file size by any real measure, you must either lose quality or resolution or both. If that wasn't the case, photographer wouldn't bother processing in RAW.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.