Photography Asked by bran on February 28, 2021
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?
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.
You can see the original Duck image uploaded to flickr:
And the optimized one:
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.
Correct answer by bran on February 28, 2021
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.
Answered by Digital Lightcraft on February 28, 2021
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 amount 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 practical 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 amount 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
Answered by woliveirajr on February 28, 2021
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.
Answered by E. Fisher on February 28, 2021
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.
Answered by Guffa on February 28, 2021
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
Answered by bougui on February 28, 2021
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.
Answered by Jesse Williams on February 28, 2021
Given a resolution and quality level, there exist several other image file formats that can give the equivalent, but store the data more compactly than does the old standard JPEG.
Some options include
JPEG2000, identified by the .jp2 extension, is a somewhat older format that just never got popular. It uses wavelet transforms rather than jpeg's DCT (discrete cosine transform) which results in artifacts that are less obvious, thus allowing for more compression with a comparable perceived quality. They claim a 20% advantage. https://en.wikipedia.org/wiki/JPEG_2000
Google's WebP uses more advanced algorithms (if I understand correctly, it's analogous to today's better H.265 compression for video as compared to MPEG), which they claim can save 40% with equivalent quality. http://www.cnet.com/news/google-offers-jpeg-alternative-for-faster-web/#!
BPG (for "better portable graphics") is a new open-source effort. It appears to be similar in approach to WebP, with additional advantages like better bit-depth and dynamic range, but as of today it has less compatibility with various software. http://bellard.org/bpg/
If you want the nitty gritty details on how these and some others compare, you can see charts and graphs here: https://people.mozilla.org/~josh/lossy_compressed_image_study_july_2014/
Answered by Chris Wuestefeld on February 28, 2021
in windows i use a program called RIOT (Radical image optimization tool). Until now is the best i know of.
Answered by Elias Monteiro on February 28, 2021
"Image Resizer for Windows" is a great free utility in less than 1MB for Windows users. All the images that are 5 MB or 10 MB can be cracked down to less than 200kb, with almost the same clarity. The problem is: these 10 MB images have a resolution of 4000 X 3000, but your phone or computer is only a 3rd of that, making it feel almost same. So unless you are going to print any of these, I will recommend compressing your images using this real-simple tool. Just select all files, right-click and say Resize. It will convert 100 images in less than a minute.
Answered by vikkee on February 28, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP