How to compress an image to the desired size. Compress JPEG file online

Hello. Quite often, when working with graphic files (pictures, photographs, and indeed any images), they need to be compressed. Most often this is necessary to transmit them over the network or post them on a website.

And despite the fact that today there are no problems with volumes hard drives(if it’s not enough, you can buy more external HDD for 1-2 TB and this is enough for a very large amount high quality photos), storing images in a quality that you will not need is not justified!

In this article I want to look at several ways to compress and reduce the size of a picture. In my example, I will use the first 3 photographs I came across on the World Wide Web.

1) bmp is an image format that provides the best quality. But you have to pay for quality with the space taken up by pictures saved in this format. The dimensions of the photos they will occupy can be seen in screenshot No. 1.

Screenshot 1. 3 pictures in bmp format. Pay attention to the file size.

2) jpg - the most popular format pictures and photographs. Provides fairly good quality with amazing compression quality. By the way, please note that a picture with a resolution of 4912×2760 in bmp format takes up 38.79 MB, and in jpg format only 1.07 MB. Those. The image in this case was compressed by about 38 times!

Regarding the quality: if you don’t enlarge the picture, it’s impossible to recognize by eye where is bmp and where is jpg. But when you enlarge a jpg image, blurriness begins to appear - these are the consequences of compression...

Screenshot No. 2. 3 pictures in jpg

3) png - (portable network graphics) very convenient format for transferring pictures on the Internet (* - in some cases, pictures compressed in this format take up even less space than jpg, and their quality is higher!). They provide better color rendition and do not distort the picture. It is recommended to use for pictures that should not lose quality and that you want to upload to some site. By the way, the format supports a transparent background.

Screenshot No. 3. 3 images in png

4) gif is a very popular format for pictures with animation (more about animation:). The format is also very popular for transmitting pictures on the Internet. In some cases, it provides images that are smaller in size than in jpg format.

Screenshot No. 4. 3 pictures in gif

Despite great amount variety of graphic file formats (and there are more than fifty of them), on the Internet, and in general, these are the files (listed above) that most often come across.

How to reduce the size of a picture in Adobe Photoshop

In general, of course, for the sake of simple compression (conversion from one format to another), installing Adobe Photoshop is probably not justified. But this program is quite popular and those who work with pictures even less often have it on their PC.

1. Open the picture in the program (either through the “File/Open...” menu, or the “Ctrl+O” button combination).

3. Set the saving settings:

Quality: depending on the selected quality (and you can set compression from 10 to 100), the size of the picture will depend. Examples of compressed images at different qualities will be shown in the center of the screen.

After that, just save the picture - its size will become an order of magnitude smaller (especially if it was in bmp)!

Result:

The compressed image began to weigh approximately 15 times less: from 4.63 MB it was compressed to 338.45 KB.

Other image compression programs

1. Fastone image viewer

One of the fastest and most convenient programs for viewing pictures, easy editing, and, of course, compressing them. By the way, it allows you to view pictures even in ZIP archives(many users often install the AcdSee program for this).

In addition, Fastone allows you to reduce the size of dozens and hundreds of images at once!

1. Open the folder with pictures, then select with the mouse those that you want to compress, and then click on the “Tools/Batch Processing” menu.

We move the pictures from the left side to the right (those that we want to compress);

We select the format into which we want to compress them;

That's all - after that, just press the start button. By the way, in addition to this, you can ask various settings for image processing, for example: crop edges, change resolution, add a logo, etc.

3. After the compression procedure, Fastone will provide a report on how much hard drive space was saved.

2.XnVew

Very popular and convenient program for working with photographs and pictures. By the way, I edited and compressed the pictures for this article in XnView.

Also, the program allows you to take screenshots of a window or a specific part of it, edit and view pdf files, find similar pictures and delete duplicates, etc.

1) To compress photos, select those that you want to process in the main program window. Then go to the Tools/Batch Processing menu.

2) Select the format into which you want to compress the pictures and click the start button (you can also set compression settings).

3) The result is quite poor, the image is compressed by an order of magnitude.

Was in bmp format: 4.63 MB;

Became in jpg format: 120.95 KB. “To the eye,” the pictures are practically no different!

3. Riot

Another very interesting program to compress images. The idea is simple: you open any image (jpg, gif or png) in it, then immediately see two windows: in one the original image, in the other the output. RIOT Program automatically calculates how much the image will weigh after compression, and also shows you the compression quality.

What’s also captivating about it is the abundance of settings; pictures can be compressed in different ways: make them sharper or turn on blur; You can turn off a color or only shades of a certain color range.

By the way, a great opportunity: in RIOT you can specify what file size you need and the program will automatically select the settings and set the image compression quality!

Here's a small result of the work: the image was compressed to 82 KB from a 4.63 MB file!

Online services for image compression

In general, I personally don’t really like compressing images using online services. Firstly, I consider it longer than a program, and secondly, in online services there are not so many settings, and thirdly, I would not like to upload all the pictures to third party services(after all, there is also private photos, which you show only in your close family circle).

In the lesson " How to compress a photo» you will learn a way to compress photos without downloading additional programs and without using online services.

By tradition, we will describe our task:

What we have: The photo we need to compress. Let's say we want to send a photo by mail, but the photo is too large.

What do we need: installed package office programs Microsoft Office


In this lesson we will talk specifically about installed program"Dispatcher Microsoft drawings Office" (in the examples the operating system is used Windows system 7), which is already included in the Microsoft Office 2007 software package. You can find it in the Start menu -> All Programs -> Microsoft Office. The icon for this program in the start menu looks like this:

Figure 1. Location of “Microsoft Office Picture Manager”

With one click of the left mouse button we launch the “Microsoft Office Picture Manager”, the program window will open:

Fig 2. Window of the Microsoft Office Picture Manager program with a picture

There are even more quick option Opening a photo in Microsoft Office Picture Manager. Find the photo that needs to be compressed:

Fig 3. Photo to be compressed

Fig 4. Another way to open the Microsoft Office Picture Manager program

Our photo will open in the program:

Fig 5. Photo opened in Microsoft Office Picture Manager

In order to compress photo Click “Change pictures...”:

Fig 6. Button “Change pictures...”

After this, on the right, an additional field with parameters for changing pictures will appear, press the button “ Compressing pictures»:

Fig 7. Button “Compress Pictures”

After clicking on the “Picture Compression” button, picture compression parameters will appear in the same block. In the “Compress for” field, for the ratio of quality and volume, select the “documents” item:

Figure 8. Picture compression options

As we can see from the field below “Expected overall size“The original file was 398 KB and after compression the photo will “weigh” about 192 KB. Almost the photo is compressed more than twice. Photos with large size, there will be a difference in size of more than 10 times!

After selecting the compression method, click on the “OK” button to start the photo compression procedure:

Fig 9. Click the “OK” button

After this, the program will perform the necessary actions to compress the photo; you can understand that the compression procedure is complete by the changed spelling of the name at the bottom of the program and the sign at the beginning of the file name “*”:

Fig 10. Mark for changing the image file

Now our photo is in a modified state, but the compression result has not yet been saved. To save changes in the photo, press the key combination on the keyboard “Ctrl + S” (this combination is in almost all Windows programs saves changes).

That's it, the photo compression operation is completed and our file now takes up half the volume. Now we can send it by mail, post it on the Internet or save it to a flash drive.

From time to time, every user needs a photo compression program. The situation is quite banal and simple - you go on vacation, take a camera with you, but there is not enough memory in the device to take more pictures. There is practically no memory on the computer either.

Then existing photos need to be compressed. This means that you need to make the files weigh less, that is, take up less space in the device’s memory. We will look at the 5 most convenient and popular programs that will help solve the problem.

But before that, let's look at one interest Ask. Is it possible to compress photos without losing quality?

Many say that this is possible and even give examples of programs that supposedly do this. In fact, it is impossible to compress any files without losing some of their information!

Yes, the algorithms may differ, and some of them allow you to compress photos with minimal losses that will be invisible to the human eye. Others make it possible to complete the task so that the loss of quality is not noticeable even to the most the best devices. But it is simply impossible to compress a picture without losing quality at all.

Most algorithms and programs in which they are used give approximately the same result as shown in Figure 1. As we can see, here the loss of quality is noticeable to the naked eye.

Rice. 1. The result of one of the photo compression algorithms

But this does not mean that all these programs should not be used. You just need to choose the ones that work better than the rest. But we did it for you.

Enjoy!

Below are all five programs that compress images best (they lose the least amount of quality) and are the most convenient to use.

Caesium

Let's start with a very unusual tool that copes with the task perfectly. Moreover, even a novice user can use it. Interestingly, Caesium is open source.

This means that anyone can absolutely calmly take this very code and add some of their own adjustments to it. If developers like them, they will implement them into next version programs. In addition, Caesium algorithms can be borrowed for your own use.

True, this program only works with three image formats - PNG, JPG and BMP. However, this is true for most similar programs and you definitely shouldn’t give up Caesium because of this. However, if you have pictures in a different format, it is better to convert them to one of the three above-mentioned formats.

“But that’s a completely different story”! (With)

When it comes to photo compression, Caesium has some limitations in its work. The most important of them is that if you use PNG, the program will only work with 24-bit images. Otherwise, the images even increase in size. Otherwise Caesium is great tool to compress photos.

Using the tool is very simple, all you have to do is do the following:

  • Download the program from the official website and install it on your computer.
  • In the largest field, simply use the mouse cursor to move the original pictures, which will later be compressed. Select the one you need by clicking on it with the left mouse button.
  • In the “Compression Options” field, move the slider next to the “Quality” inscription. It is responsible for the quality of the output image.
  • In the “Output Folder” section, specify the folder where the image will be saved.
  • Press the “Compress!” button and wait for the process to complete. His progress can be judged by the scale below.
  • After this, you can find the compressed photo in the folder specified in the fourth step of this list.

Rice. 2. Using Caesium

FastStone Image Viewer

This is not an open source project source code, this is an excellent professional tool, which, however, is distributed free of charge. FastStone Image Viewer designed to work with images in principle. It performs not only compression, but also a great many other operations with images.

Basically, this tool just shows them. That is, this is a replacement standard tool viewing images and faxes from Windows and similar programs for others operating systems.

FastStone Image Viewer is very convenient when you need to send some photos over the Internet. The program can automatically reduce the width and height so that the resulting image meets the criteria of a particular resource.

In addition, using of this instrument You can archive pictures. Moreover, after compressing the files, all of them can be easily placed in an archive. This will reduce their size even further.

Overall, FastStone Image Viewer is very feature rich and truly quality item!

To use it, you need to do the following:

  1. First, you need to download the program from the official website and install it accordingly.
  2. It is advisable to copy all files intended for compression into one folder before starting work. Then it will be easier to import all of them into the program.
  3. After this, launch FastStone Image Viewer. On the left there will be a tree of folders in which you will need to select yours. When you click on it, all the images will automatically appear in a large window on the right.

Rice. 3. Selecting a folder with photos in FastStone Image Viewer

  1. Now select the pictures to be compressed in the same window on the right. This is done with the mouse cursor.

Rice. 4. Selecting images in FastStone Image Viewer

  1. Now click "File" on the left top corner programs. In the drop-down menu, select the “Send by e-mail” option.

Rice. 5. The “Send by e-mail” item in the drop-down list of the “File” menu

  1. The compression menu will open. Where it was originally written, "<Выбор размера>", in the drop-down menu, select the size of the output image. Optionally, check the “Add frame” and “Save EXIF/IPTC data” checkboxes. Also, if desired, all pictures can be renamed. To do this, check the appropriate box and set a name template. Next, check the “Pack images into archive” checkbox if you want this action to be performed.

Rice. 6. Compression settings in FastStone Image Viewer

  1. Click on the “Copy to...” button and in the window that appears, select the path to save the files.

Rice. 7. “Copy to...” button in the compression settings window

  1. Wait for the process to complete.

As you can see, it’s also nothing complicated.

ImageCompressor

Everything about this tool is extremely simple. There are no special display elements like in FastStone Image Viewer. And there are not many functions here at all, but specifically one, and this is image compression. On the one hand, this is even good, because the developers paid as much attention as possible to the compression operation, and were not distracted by anything else.

Judging by many reviews and tests, ImageCompressor does its job a little better than Caesium. The quality of compressed files is practically not lost. At least this is not noticeable to the human eye.

Using ImageCompressor is as follows:

  1. First, download and run the program on your computer ().
  2. Import source images into the program. To do this, click on the button with the ellipsis. Will open standard window file selection in which you need to select the ones you need.
  3. Next to the “Quality” inscription, use the slider to indicate the desired quality of the resulting images. If desired, you can specify it manually in the corresponding field to the right of the slider.
  4. Check the box next to “Size in %” and use the slider to select 100 or enter this number manually. This will show the program that you want to save 100% of the photo size.
  5. Next, check the box next to “Save as JPEG” or “Save as PNG” - depending on the format in which you want to save the image.
  6. Click on the ellipses button under the words “Save Compressed Images...” and in the window that appears, select the folder where the compressed images will be saved.
  7. Click on the “Compress All” button and wait for the process to complete.

Rice. 8. Working in ImageCompressor

Upon completion compressed files can be found in the folder specified in step six.

Pngyu

Another very unusual tool that perfectly reduces the size of photos. Its main difference is that Pngyu is a cross-platform tool. It can be used by Windows fans and Mac OS fans.

True, Pngyu, as one could already understand from the name, works with a single file format – PNG. Therefore, again, before using it is necessary to convert the photo to this format.

It makes sense!

Pngyu is truly one of the coolest photo compression tools! It's definitely worth using.

Interesting: Sometimes by converting photos from one format to another you can reduce the file size. True, the quality may be lost to such an extent that it will be noticeable.

To use Pngyu, do this:

  1. Download Pngyu to your computer and run it - here is the link for Windows, and here is for Mac OS.
  2. Drag all the original pictures with the mouse cursor into the largest field in the middle of the program window. It also initially says “Drop here”.
  3. If you want to change any compression settings, click on the “Custom” button at the top of Pngyu (left).
  4. If you want the original to be overwritten, that is, you do not have two images - one original and one compressed, leave the "Overwrite the original" button selected. And if you want to specify the path for the output image, select “Custom” and do so.
  5. Click on the "Compress Start" button. Compression will begin. Wait for it to finish.

Rice. 9. Pngyu's work

In the same field where you initially uploaded the pictures, it will be shown original size each file and size compressed picture. There is also information about how many percent the compression occurred and how much was saved (in MB or KB).

In general, it’s also very convenient and simple!

FILEminimizer

This program takes a very radical approach to compressing photos, as well as the most different files for other purposes. It removes everything that is not directly related to the picture. This could be metadata, some signatures, Additional Information and so on.

FILEminimizer also recodes photos. In some cases, this leads to the fact that the quality of the photo is lost, but all this can be adjusted. Although this process is also quite complicated. Among all the programs described here, FILEminimizer has the highest compression percentage.

In the very in simple form Using this program looks like this:

  1. Initially, the program is downloaded, for example, from this link, and launched on the computer.
  2. After launch source files should be placed in the field labeled “Files to optimize”.
  3. Then just click on the “Optimize Files” button. The program will automatically select all required parameters. If you still want to customize them, check the box next to “Custom Compression” and click on the “Settings” button. A settings window will appear in which you can select everything you need.

Rice. 10. Working in FILEminimizer

As you can see, there are many good programs to compress photos, which will help you save space on your storage media.

Below is visual instructions by use FastStone programs Image Viewer.

The main thing is to indicate the image on your computer or phone, specify the quality from 1 to 100, and click OK at the bottom of the page. The rest of the settings are set to default. How more indicated " quality» in settings (80-100), themes the size will be larger file. And vice versa, lower quality (50-75) will give smaller size JPEG file. If necessary, you can find out the level of quality (compression) with which the jpeg file was created.

If, after compression, the size of the jpeg file has become, on the contrary, larger than the original, then you need to lower the quality level from 80 to more smaller number, for example, set to 60. The dimensions in pixels and megabytes before and after compression can be seen after processing or pressing the OK button. If, at a quality level of 40-50, the size is still larger than the original, then there is no point in compressing the image - it was already well compressed. You can only try to remove the metadata embedded in the jpg file or remove exif + make the jpg progressive without losing quality.

In the settings you can select the type of subsampling (decimation), which allows you to achieve greater compression jpg file with minimal losses. Subsampling 1x1 gives the best image quality, bright color transitions are preserved, mainly suitable for high-quality previews or small preview images. 2x1 subsampling is the most common method, used in almost all digital cameras, compression of sharp color transitions occurs horizontally, allows you to achieve a smaller file size without much loss, great for large images. 1x2- the same as 2x1, but only the averaging of sharp color transitions will be vertical. Subsampling 2x2 averages sharp color transitions horizontally and vertically, allows you to achieve the smallest file size, and is suitable for blurry pictures.

The original image is not changed in any way. You will be provided with another processed image in jpg format.

1) Specify an image in BMP, GIF, JPEG, PNG, TIFF format:

2) JPG file compression options
Reduce size in megapixels: reduction disabled reduce by 10% reduce by 20% reduce by 30% reduce by 40% reduce by 50% reduce by 60% reduce by 80% make no more than 0.5 MP (≈943x530) make no more than 1 MP (≈1366x768) make no more than 2 MP (≈1880x1060) make no more than 3 MP (≈2300x1300) make no more than 5 MP (≈2980x1670) make no more than 10 MP (≈4220x2370) make no more than 20 MP (≈5960x3350)
(Reducing the size by 20-30% in pixels or megapixels works well to reduce file size) Subsampling: 1x1 (best quality) 2x1 (average quality) 1x2 (average quality) 2x2 ( low quality) Do not change (Thinning, averaging of sharp color transitions) Standard JPEG Progressive JPEG
(A progressive jpeg file almost always takes up 2-3% less space than a regular jpeg file with the same quality) Copy EXIF ​​and other metadata? Yes No
(“No” may further reduce the file size, but all additional information listed will be erased) Quality (from 1 to 100) (The main parameter, the lower the quality, the less JPEG size file)


Processing usually lasts 0.5-20 seconds.

The photographs of "Red Pepper After the Rain" indicate the level JPEG quality for comparison:

Dimensions of this jpg pictures depending on the quality level (Q is quality, KB is the size in kilobytes):
Q 10 = 2 KB; Q 15 = 2.7 KB; Q 30 = 4.3 KB; Q 50 = 5.9 KB; Q 60 = 6.7 KB; Q 70 = 7.9 KB; Q 80 = 9.8 KB; Q 90 = 14.1 KB; Q 100 = 46.5 KB.

From the above examples it can be concluded that best ratio size-quality can be a quality level from 75 to 95. And in order for the picture to occupy the smallest size and at the same time be more or less normal, a quality of 60-70 is suitable. If quality does not matter, but you need small size file, then a quality percentage from 30 to 50 is suitable.

Please note that the file size of a progressive JPEG image is usually 2-3% smaller than a standard one with the same image quality, and it will also open beautifully when loaded into an Internet browser, as is usually done in films! An example of a standard and progressive JPEG image can be viewed.

You will need

  • Free graphics editor"Paint.NET" (download from the official website: http://paintnet.ru/download/) or shareware/paid programs for image editing.

Instructions

In order not to lose the quality of the photo, it is better not to use it for converting standard program“Paint” from Windows. Use the free program “Paint.NET” on . This application takes up little disk space and is accessible even to a beginner. Or install a shareware editing program. These can be “Adobe Photoshop”, “Ulead PhotoImpact”, “ACD SeeSystem” and others.
Let's look at the technique of photography using an example free program“Paint.NET” Load the desired photo into the program using the “File” - “Open” button or by dragging the file into the program window. Now, to reduce the weight of the photo, click “File” - “Save As”. They have the smallest volume graphic files JPG extensions or JPEG. PNG files have better quality, indistinguishable from JPG by the human eye, and are larger in size. The BMP (dot point) and TIF formats give the greatest weight to a photograph. Select the JPG/JPEG file type and click Save. The photo being saved and the “Quality” slider, determined as a percentage, will appear on the screen. By default, JPEG photo quality is 95%. You can drag the slider until the image quality begins to drop, for example, to 80-85%. On the right you will see the result after saving () and the future weight of the photo.
Also in a good way To reduce the weight of a large photo is to change the resolution. To do this, select “Image” - “Resize”. Modern digital ones are capable of taking pictures of 4000x3000 pixels or more. You can reduce this resolution proportionally, for example, to 2560x1920 - this is the resolution large monitor. At the same time, the quality of the photo will remain the same.
Using these two methods, you can always reduce the weight of a photo without the color and quality of the image.

Video on the topic

note

When editing photos, always select the "Save As" button rather than just "Save." This will allow you to use the original photo if the image quality of the reduced weight image is lost. Remember that it is possible to degrade the quality of a photo, but to improve it is quite problematic.

Helpful advice

If you don’t know how to reduce the weight of a large number of photos, for example thousands, use photo editors with batch conversion.

Sources:

  • Official Russian website of the Paint.NET program
  • how to reduce the weight of a picture

Sometimes you need to transfer from one computer to another a large number of photographs. If these photographs were taken in very good quality, their size and weight will be very large. This may cause some inconvenience. For example, all the photos may simply not fit on a flash drive or disk. It's easy to get out of this situation. You need to reduce the quality and size of your photos.

You will need

Instructions

There are several ways to reduce the quality of pictures. Let's look at the simplest one. First, copy all the photos you want to reduce to separate folder, call it “smaller copies”. It is very convenient when you have photographs of average quality for uploading to the Internet and transferring to a nearby computer. But at the same time there should also be pictures of the original sizes that you will need if you solve them on paper.

Now open the “reduced copies” folder and let’s actually reduce the quality. Click on the first photo right click mouse and select "open with → Microsoft" picture manager" This is a standard built-in program and, as a rule, it is on every .

Compression options will appear in the same right field. The most optimal of them is for. If you select it, your photo will be compressed and fit into a size of 1024x768 pixels. You will also see a warning below that the image is not suitable for photographic quality. But it’s quite suitable for watching with friends on. This shows the weight of the photograph before compression and after compression. The difference, as you can see, is big. Click "ok".

Then move to the next photo by clicking on the arrow under the photo. Do the same operations as with previous photo. And so we process all the photos step by step. When everything is ready, click "file - save all". The program can now be closed. Photo quality has been reduced.

Install new size images by specifying the width and height of the images in the appropriate fields. Check the “Save” checkbox so that your images do not lose yours and click the “Start” button. The conversion process will begin, after which you will be offered a folder with photos that have the new size.

Helpful advice

If you're not sure what resolution you should choose to reduce the size of your photos, select Percentage instead of Pixels and enter the desired size in percentage to the original photo.

Do you want to make yourself beautiful avatar, or edit a photo for your blog, but don’t know how to reduce picture without losses quality? In this case, you should turn to image editors. There are several user programs for working with images in which you can reduce picture without compromising its quality. The most famous are IrfanView, Paint, Adobe Photoshop. Photoshop is most suitable for solving this problem.

You will need

Instructions

Open the image in Adobe program Photoshop, in the "File" menu, clicking the "Open" button, select your image.

Select JPEG High in the settings window when saving. Look at the photo size and if you are happy with it, click the “Save” button. If the size does not suit you, move the settings slider to the right or left until the frame size meets your expectations.

Save the photo under a new name, which is best written with Latin letters for correct display on the Internet. Now you can publish it on any Internet site, and even users with a slow Internet connection will not experience delays when loading the photo.

Tip 8: How to Reduce the Size of Multiple Photos in 2019

Web design involves working with big amount images, and some of this work itself begs to be automated. It's so boring and monotonous. In particular, the process of reducing photo sizes can be automated by Adobe Help Photoshop.

You will need

Instructions

Create new folder and place the photos you are going to reduce in size into it. Launch Adobe Photoshop and press Alt+F9 to open the Actions window. Click on the “Create a new operation” button, which is located at the bottom of the window that appears. In the new menu you can specify the name for the operation and the key to start it; other parameters are not so important. Then click “Record”.