6.21. Velikost obrázku

Funkce Velikost obrázku slouží ke zvětšování nebo zmenšování obrázku ve smyslu změny počtu pixelů, které obrázek obsahuje. Změní velikost obsahu obrázku a zároveň změní ve stejném poměru velikost plátna obrázku.

Velikost obrázku mění celý obrázek. Pokud zmenšovaný obrázek obsahuje více vrstev o různé velikosti, může se stát, že některá z nich bude zmenšena natolik, že úplně zmizí (rozměry vrstvy nemohou být menší, než 1 pixel). Pokud by se mělo něco takového stát, GIMP vás na to upozorní.

Pokud chcete zvětšit nebo zmenšit pouze jednu vrstvu, použijte funkci Změnit velikost vrstvy.

[Poznámka] Poznámka

If scaling would produce an image larger than the Maximum new image size set in the System Resources page of the Preferences dialog (which has a default of 128 Mb), you are warned and asked to confirm the operation before it is performed. You may not experience any problems if you confirm the operation, but you should be aware that very large images consume a lot of resources and extremely large images may take more resources than you have, causing GIMP to crash or not perform well.

6.21.1. Activate the Command

  • You can access this command from the image menubar through ImageScale Image….

6.21.2. The Scale Image Dialog

Obrázek 16.82. Dialog Image Scale

Dialog Image Scale

Velikost obrázku

You should keep in mind that an image can be located in one of four places: in the image file, in RAM after it has been loaded, on your screen when it is displayed, or on paper after it has been printed. Scaling the image changes the number of pixels (the amount of information) the image contains, so it directly affects the amount of memory the image needs (in RAM or in a file).

However printing size also depends upon the resolution of the image, which essentially determines how many pixels there will be on each inch of paper. If you want to change the printing size without scaling the image and changing the number of pixels in it, you should use the Print Size dialog. The screen size depends not only on the number of pixels, but also on the screen resolution, the zoom factor and the setting of the Dot for Dot option.

If you enlarge an image beyond its original size, GIMP calculates the missing pixels by interpolation, but it does not add any new detail. The more you enlarge an image, the more blurred it becomes. The appearance of an enlarged image depends upon the interpolation method you choose. You may improve the appearance by using the Sharpen (Unsharp Mask) filter after you have scaled an image, but it is best to use high resolution when you scan, take digital photographs or produce digital images by other means. Raster images inherently do not scale up well.

You may need to reduce your image if you intend to use it on a web page. You have to consider that most internet users have relatively small screens which cannot completely display a large image. Many screens have a resolution of 1024x768 or even less.

Adding or removing pixels is called Resampling.

Šířka; Výška

When you click on the Scale command, the dialog displays the dimensions of the original image in pixels. You can set the Width and the Height you want to give to your image by adding or removing pixels. If the chain icon next to the Width and Height boxes is unbroken, the Width and Height will stay in the same proportion to each other. If you break the chain by clicking on it, you can set them independently, but this will distort the image.

However, you do not have to set the dimensions in pixels. You can choose different units from the drop-down menu. If you choose percent as the units, you can set the image size relative to its original size. You can also use physical units, such as inches or millimeters. If you do that, you should set the X resolution and Y resolution fields to appropriate values, because they are used to convert between physical units and image dimensions in pixels.

X resolution; Y resolution

You can set the printing resolution for the image in the X resolution and Y resolution fields. You can also change the units of measurement by using the drop-down menu.

Kvalita

To change the image size, either some pixels have to be removed or new pixels must be added. The process you use determines the quality of the result. The Interpolation drop down list provides a selection of available methods of interpolating the color of pixels in a scaled image:

Interpolation methods are described in Cubic (sometimes called Bicubic): The color of each pixel is computed as the average color of the eight closest pixels in the original image. This usually gives the best result, but it naturally takes more time..

[Poznámka] Poznámka

See also the Scale tool, which lets you scale a layer, a selection or a path.