How to compress a JPG image File

2

I am trying to send an email with an image attachment. But the image size is 40MB and the attachment size can only be 25MB. How can I compress the size of the image so that I can send it via Email?. I have tried using 7-zip and only got it down to 28MB.

The JAVA Noob

Posted 2012-06-07T02:51:15.433

Reputation: 23

There are many online websites like https://compress-jpeg.online , https://tinyjpg.com/ which reduce the overall size of images with no real difference in quality

– beginner – 2018-08-25T11:13:23.630

Which operating system are you using? If it's Windows, an easy way is to use Microsoft Picture Manager – prrao – 2012-06-07T02:54:13.573

Just use 7zip to split the archive into multiple parts, and send two separate attachments. Extracting one part of the archive will automatically prompt for the other one, and will reconstruct the original file. – Breakthrough – 2012-12-21T00:48:56.527

Answers

11

JPG files are already compressed so further compression is not particularly successful. Some things to try
- edit the image an resize it to make it smaller
- Edit the image to drop the jpg quality
- Use a file transfer service like dropbox (non-email solutions are preferred by sysadmins everywhere)

uSlackr

Posted 2012-06-07T02:51:15.433

Reputation: 8 755

uSlacker, that is not true. JPEGs are not built for good compression, but for fast image decompression. Try to zip a jpeg and you usually end up with a slightly smaller file - even though it's built for text compression. But there are methods to further compress JPEGs based on the image structure. Test HIEF, dropbox, or trellis compression. – mousomer – 2017-12-08T08:22:31.620

@mousomer I think that's what I said "further compression Not particularly successful". That question was from 2012 and i think it was close enough for the OPs – uSlackr – 2017-12-11T01:14:21.573

3+1 for Dropbox. There is not much reason to send large file over email any more. – William Jackson – 2012-06-07T02:58:00.840

@TheJAVANoob: You should still compress it, whether you decide to upload it to Dropbox or send it by email. 40MB is OK if that much detail is needed, but that's hardly ever the case. – Dennis – 2012-06-07T03:14:21.460

1In the early days we used file splitters so we could email several smaller pieces, then the recipient could re-assemble the pieces...the good ol days...sort of. – Moab – 2012-06-07T16:16:48.420

1Twiddling with quality setting and size can make your 40MB image drop to under a MB and still look good on screen. – Matt H – 2012-12-21T00:55:53.180

3

Using 7-zip, you can split the resulting archive into multiple pieces.

  1. Right Click on File, Click on 7-Zip, then "Add To Archive..."
  2. Near the bottom left, look for "Split to volumes, bytes"
  3. Select 10M from the drop down list, or enter your own custom value, such as 20M for 20 meg files.
  4. Email each or the resulting files individually to the recipient.

Kibbee

Posted 2012-06-07T02:51:15.433

Reputation: 1 372

1

Dictionary compression – used by 7zip's Lempel-Ziv-Markov chain algorithm (LZMA) – performs great on text, but rather poorly on images.

There's a vast number of tools that can compress images.

Here's how to do it with JPEG imager:

  1. Download and install.

  2. Open the image.

  3. Press Ctrl + M and resize the image using reasonable values.

  4. Compress the image by moving the Quality slider to the left.

  5. Press Ctrl + S to save the image.

Dennis

Posted 2012-06-07T02:51:15.433

Reputation: 42 934

The quality information was completely wrong, so I removed it. – sysrqb – 2013-06-22T04:08:25.480

0

On a PC it is easy to compress a photo.

  1. Right click on the photo and select send to > mail recipient

  2. A dialog box will open asking if you want to resize your photo

  3. Multiple sizes will be presented and as you select each one, the adjusted file size will be shown.

  4. Select Attach and the reduced jpeg will be attached to your email.

  5. Hit send or if you just wanted a smaller photo, you can drag the attachment into a folder and you now have a smaller version of your photo

Anthony

Posted 2012-06-07T02:51:15.433

Reputation: 1

This might be an answer but it assumes the fact that OP is using an email client. – pun – 2015-11-18T12:25:02.787

0

Mostly you would need to cut either quality or pixels from your 40MB image to make it <25MB. If it is something like 90% Quality JPEG at 40MB (or is it loss-less?) it can hit your mark with a 72-75% quality setting.

Much like how the PNG format has tools like PNGCrush to improve the way compression encoding is done without affecting quality or size, JPEG can make use of programs like JPEGmini or MozJpeg which optimizes for screen viewing with good defaults, a minimal container, and arithmetic coding over Huffman-coding, or improved tables for the Huffman-coding (respectively). Also there's a bunch of optional data in JPEGs (you likely know about the Exif metadata) like more bits per channel (12bit color), preferences in color profiles, comments, fill bytes, progressive loading, and oh my, sometimes a camera's Exif metadata includes a thumbnail for the cameras GUI, an uncompressed one. Various tools can help you streamline this stuff out, but look at the aforementioned.

dlamblin

Posted 2012-06-07T02:51:15.433

Reputation: 9 293