Si teniu imatges que ocupin molt d'espai en el disc, podeu reduir aquest espai fins i tot sense canviar les dimensions de la imatge. La millor compressió d'imatge s'aconsegueix amb el format JPG, però fins i tot si la imatge ja està en aquest format, generalment podeu aconseguir que ocupi menys espai, ja que el format JPEG té un esquema de compressió adaptatiu que permet desar variant els nivells de compressió. L'inconvenient és que, com menys espai ocupi la imatge, més detall de la imatge original perdeu. També hauríeu de tenir en compte que en desar repetidament en el format JPEG es provoca cada vegada més degradació en la imatge.
Images are loaded and saved as .XCF files. Your JPG image has been loaded as XCF. GIMP offers you to Overwrite image-name.jpg or → to open the «Export Image» dialog.
The dialog opens with the file name already typed in the Name box, with the default .png extension. Delete the existing extension and type JPG instead, and GIMP will determine the file type from the file extension. Use the file extension list, marked with red in the figure above, to see the types supported by GIMP. The supported extensions change depending on your installed libraries. If GIMP complains, or if «JPEG» is disabled in the list of extensions, cancel and step through Secció 4.7, «Canvia el mode». Once you have done this, click . This opens the «Export Image as JPEG» dialog that contains the Quality control.
El diàleg «Exporta com a JPEG» fa servir valors predeterminats que redueixen la mida del fitxer i mantenen una bona qualitat visual. Aquesta és la manera més segura i ràpida de fer-ho.
Figura 3.21. Exemple per a un JPEG amb una compressió moderada
Quality: 90 (default); Size: 33.7 KiloBytes
Quality: 75; Size: 20.1 KiloBytes
Reduce the image Quality to make the image even smaller. Reduced quality degrades the image, so be certain to check «Show preview in image window» to visually gauge the degradation. A Quality setting of 10 produces a very poor quality image that uses very little disk space. A quality of 75 produces a reasonable image using much less disk space, which will, in turn, load much faster on a web page. Although the image is somewhat degraded, it is acceptable for the intended purpose.
Per a acabar, aquí hi ha una comparació de la mateixa imatge amb diversos graus de compressió:
Figura 3.22. Exemple per a un JPEG amb molta compressió
Qualitat: 10; mida: 3,4 kilobytes
Qualitat: 40; mida: 9,3 kilobytes
Figura 3.23. Exemple per a un JPEG amb una compressió moderada
Qualitat: 70; mida: 15,2 kilobytes
Qualitat: 100; mida: 72,6 kilobytes