I have two images with different size and resolution. I need to do a cognitive experiment so is mandatory that different images are as much equal as possible. Is there any method to reduce the quality of an image in terms of size and ppi to make it equal to the other one?
-
Hi Filippo and welcome to GDSE! Are you using a specific software?– curious ♦Sep 18, 2019 at 14:25
-
Thanks! I have basic knowledge in different software like Gimp and ImageJ. I know also some Matlab and Imagemagick code for dealing with images! however I don't I know very well image processing or images in general– Filippo GambarotaSep 18, 2019 at 16:04
-
1I would be very careful with the word quality here. Resolution is not a quality metric, nor is the image size usually one. So its a bit meaningless to say they have same quality if they have different sharpness and different black/whitepoint conditions or contrast. Resolution by the way is only meaninful if you print the image.– joojaaSep 18, 2019 at 17:54
1 Answer
TLDR: Yes
You can scale an image to a smaller size and allow your raster image editing software to "resmaple" it. You can do it using almost any raster image editor.
Note that the resolution in PPI/DPI is not the problem here. The true resolution of a digital image, and its quality is only dependent on its size in pixels. So, you should check the size in pixels to make both images the same or similar sizes. You can ignore the resolution settings, they aren't really relevant here. The PPI/DPI might be relevant if you are using the images to layout a document for print, but that's a different issue. If you don't understand resolution and what it is/isn't, then for further reading check The Myth of DPI.
Here's an example using the popular free image editor GIMP (or Photoshop which isn't free), but this would be possible in other software too.
- Open an image, using File > Open
- Click Image > Scale Image (the equivalent in Photohsop is Image > Image Size)
- Type in either a new width or new height in pixels. The software will automatically work out the other dimension so the image is not distorted, i.e. so that the aspect ratio is preserved.
Note: in other software such as Photoshop, you may need to check an option that says something like "resample". You don't have to do this in GIMP.
- Finally click Scale, and File > Export as (or Save as in Photoshop), to save your image in the required format.
Warning when exporting an image, make sure that you use a new file name or you may overwrite the original image file. If you do that, then it can't be undone!
Example showing GIMP's Scale Image dialog
Example showing Photoshop's Image Size dialog.
-
Thanks for your clear response! for the sake of clarity... If I simply reduce the size in px of an image I reduce also the quality? Let's say that I have a 1000*1500 image and a 500*600 image. If I want two equal images in (dimension and resolution) I can reduce (scaling in Gimp) the first to 500*600. However, my impression is that the quality is better in the first even if the size is the same. I've also tried to set the interpolation to none instead of cubic or linear but the first image is still better (in other terms if I zoom at the same level the second image appear more frangmentate) Sep 18, 2019 at 16:10
-
@FilippoGambarota since meaning of quality is not defined anywhere tge answer is NO– joojaaSep 18, 2019 at 17:56
-
@FilippoGambarota You will reduce the visible detail in raster images when resampling smaller. That's why I told you not to overwrite the original. If you remove pixels then you are basically removing data, and if you overwrite the file you can't get that data back That's the price you pay when using raster images (which are made of pixels). Fewer pixels = less data = less detail. Note: you can't zoom in on smaller raster images and expect them to look the same as a larger image. You should view them at 100% or 1:1 Sep 19, 2019 at 1:03
-
ok perfect! I would be sure that reducing the image size, in digital image terms (beyond luminance, contrast, etc..) the two images are the same. When I speak about zooming I mean that after the scaling if I zoom in let's say at 30% the two images (same size) seems to be different. The bigger now resized image appear with more pixel and so with less visual resolution loss due to zooming. Sep 19, 2019 at 6:49