Capítulo 6. Getting Images out of GIMP
| Parte II. ¿Cómo convertirse en un mago del GIMP? |

## Capítulo 6. Getting Images out of GIMP

## 1. Archivos

The GIMP is capable of reading and writing a large variety of graphics file formats. With the exception of GIMP's native XCF file type, file handling is done by Plugins. Thus, it is relatively easy to extend GIMP to support new file types when the need arises.

Ningún tipo de archivo es bueno para ser usado en todos los casos. Esta parte de la documentación lo ayudará a entender las ventajas y desventajas de cada tipo.

### 1.1. Guardado de imágenes

Cuando haya terminado de trabajar con una imagen, querrá guardar los resultados. (de hecho, es a menudo una buena idea guardar también en etapas intermedias: GIMP es un programa completo y robusto, pero hemos escuchado algunos rumores, posiblemente apócrifos, de que en raras y misteriosas ocasiones se lo ha visto fallar). La mayoría de los formatos de archivo que el GIMP puede abrir, también pueden ser usados para guardar. Hay, sin embargo, un formato de archivo que es especial: XCF es el formato nativo del GIMP, y es útil porque guarda todo lo que hay en una imagen (bueno, casi todo, no guarda la información de “deshacer” ). Por eso, el formato XCF es especialmente útil para guardar resultados intermedios de trabajos que van a volver a ser abiertos en el GIMP. Los archivos XCF no pueden ser leídos por la mayoría de otros programas que muestran imágenes, así que una vez que haya terminado, probablemente también querrá guardar la imagen en un formato usado más ampliamente, como JPEG, PNG, TIFF, etc.

### 1.2. Guardar archivos

There are several commands for saving images. A list, and information on how to use them, can be found in the section covering the File Menu.

GIMP allows you to save the images you create in a wide variety of formats. It is important to realize that the only format capable of saving all of the information in an image, including layers, transparency, etc., is GIMP's native XCF format. Every other format preserves some image properties and loses others. When you save an image, GIMP tries to warn you, but it is up to you to understand the capabilities of the format you choose.

Figura 6.1. Example of an Export dialog

As stated above, there is no file format, with the exception of GIMP's native XCF format, that is capable of storing all the information in a GIMP image. When you ask to save an image in a format that will lose information, GIMP notifies you, tells you what information will be lost, and asks you whether you would like to “export” the image in a form that the file type can handle. Exporting an image does not modify the image itself, so you do not lose anything by exporting. See Export file.

| Nota
When you close an image (possibly by quitting GIMP), you are warned if the image is "dirty"; that is, if it has been changed without subsequently being saved. Saving an image in any file format will cause the image to be considered "not dirty", even if the file format does not represent all of the information from the image.

#### 1.2.1. Saving as GIF

Figura 6.2. The GIF Save dialog

| Aviso
The GIF file format does not support some basic image properties such as print resolution. If you care for these properties, use a different file format like PNG.

GIF Options
  Interlace

    Checking interlace allows an image on a web page to be progressively displayed as it is downloaded. Progressive image display is useful with slow connection speeds, because you can stop an image that is of no interest; interlace is of less use today with our faster connection speeds.

  GIF comment

    GIF comments support only 7-bit ASCII characters. If you use a character outside the 7-bit ASCII set, GIMP will save the image without a comment, and then inform you that the comment was not saved.

Animated GIF Options
  Loop forever

    When this option is checked, the animation will play repeatedly until you stop it.

  Delay between frames if unspecified

    You can set the delay, in milliseconds, between frames if it has not been set before. In this case, you can modify every delay in the Layer Dialog.

  Frame disposal when unspecified

    If this has not been set before, you can set how frames will be superimposed. You can select among three options :

    - I don't care: you can use this option if all your layers are opaque. Layers will overwrite what is beneath.

    - Cumulative Layers (combine): previous frames will not be deleted when a new one is displayed.

    - One frame per layer (replace): previous frames will be deleted before displaying a new frame.

#### 1.2.2. Saving as JPEG

Los archivos JPEG usualmente tienen la extensión .jpg, .JPG, o .jpeg. Es un formato ampliamente utilizado, porque comprime imágenes muy eficientemente, minimizando la pérdida de calidad. Ningún otro formato se le acerca a lograr el mismo nivel de compresión. No obstante, no soporta transparencia, ni múltiples cuadros. Por esta razón, guardar imágenes en este formato normalmente implica exportarlas desde otro.

Figura 6.3. El diálogo de guardar para JPEG

El algoritmo JPEG es bastante complejo, y en él intervienen un gran número de opciones, cuyo significado está más allá del objetivo de esta documentación. A menos que seas un experto en JPEG, el parámetro de calidad es probablemente el único que te será útil.

| Atención
Luego de que guardes una imagen como un archivo JPEG, ésta ya no será considerada como "modificada" por el GIMP, así que a menos que realizes cambios en la misma, no obtendrás un aviso de precaución si la cierras. Como JPEG tiene pérdida de calidad y no admite transparencia ni múltiples cuadros, algo de la información de la imagen puede perderse. Si lo que quieres es guardar toda la información de la imagen, usa el formato nativo del GIMP, XCF.

Calidad>

  Al guardar un archivo en formato JPEG verás un diálogo que te permite ajustar el nivel de calidad, que tiene un rango de 0 a 100. Valores por sobre 95 no son necesarios generalmente. La calidad por defecto es 85 y usualmente produce excelentes resultados, pero en algunos casos es posible colocar la calidad sustancialmente baja sin que la imagen se vea notablemente afectada. Puedes probar el resultado de diferentes calidades activando la opción “Mostrar vista previa en la ventana de la imagen” en el diálogo. Esto hace que cada cambio en cualquier parámetro del diálogo JPEG sea visualizado en la imagen en pantalla (esto no altera la imagen, sino que vuelve al estado original una vez que el diálogo es cerrado).

  | Nota
  Please note, that the numbers for the JPEG quality level have a different meaning in different applications. Saving with a quality level of 80 in GIMP is not necessarily comparable with saving with a quality level of 80 in a different application.

Preview in image window

  Checking this option causes each change in quality (or any other JPEG parameter) to be shown in the image display. (This does not alter the image: the image reverts back to its original state when the JPEG dialog is closed.)

Advanced settings

  Algo de información sobre las opciones avanzadas:

  Optimize

    If you enable this option, the optimization of entropy encoding parameters will be used. The result is typically a smaller file, but it takes more time to generate.

  Progressive

    With this option enabled, the image chunks are stored in the file in an order that allows progressive image refinement during a slow connection web download. The progressive option for JPG has the same purpose as the interlace option for GIF. Unfortunately, the progressive option produces slightly larger JPG files (than without the progressive option).

  Save EXIF data

    JPEG files from many digital cameras contain extra information, called EXIF data. EXIF data provides information about the image such as camera make and model, image size, image date, etc. Although GIMP uses the “libexif” library to read and write EXIF data, the library is not automatically packaged with GIMP. If GIMP was built with libexif support, then EXIF data is preserved if you open a JPEG file, work with the resulting image, and then save it as JPEG. The EXIF data is not altered in any way when you do this. The EXIF data may indicate things such as image creation time and file name, which may no longer be correct. If GIMP was not built with EXIF support, you can still open JPG files containing EXIF data, but the EXIF data is ignored, and will not be saved when the resulting image is later saved.

  Save thumbnail

    This option lets you save a thumbnail with the image. Many applications use the small thumbnail image as a quickly available small preview image.

    | Nota
    This option is present only if GIMP was built with EXIF support.

  Save XMP data

    XMP data is “meta” data about the image; it is a competing format with EXIF. If you enable this option, the meta data of the image is saved in an XMP-structure within the file.

  Use quality settings from original image

    If a particular quality setting (or “quantization table”) was attached to the image when it was loaded, then this option allows you to use them instead of the standard ones.

    If you have only made a few changes to the image, then re-using the same quality setting will give you almost the same quality and file size as the original image. This will minimize the losses caused by the quantization step, compared to what would happen if you used different quality setting.

    If the quality setting found in the original file are not better than your default quality settings, then the option “Use quality settings from original image” will be available but not enabled. This ensures that you always get at least the minimum quality specified in your defaults. If you did not make major changes to the image and you want to save it using the same quality as the original, then you can do it by enabling this option.

  Smoothing

    JPG compression creates artifacts. By using this option, you can smooth the image when saving, reducing them. But your image becomes somewhat blurred.

  Restart markers

    The image file can include markers which allow the image to be loaded as segments. If a connection is broken while loading the image in a web page, loading can resume from the next marker.

  Subsampling

    The human eye is not sensitive in the same way over the entire color spectrum. The compression can use this to treat slightly different colors that the eye perceives as very close, as identical colors. Three methods are available :

    - 1x1,1x1,1x1 (best quality): Commonly referred to as (4:4:4), this produces the best quality, preserving borders and contrasting colors, but compression is less.

    - 2x1,1x1,1x1 (4:2:2): This is the standard subsampling, which usually provides a good ratio between image quality and file size. There are situations, however, in which using no subsampling (4:4:4) provides a noticeable increase in the image quality; for example, when the image contains fine details such as text over a uniform background, or images with almost-flat colors.

    - 1x2,1x1,1x1 This is similar to (2x1,1x1,1x1), but the chroma sampling is in the horizontal direction rather than the vertical direction; as if someone rotated an image.

    - 2x2,1x1,1x1 (smallest file): Commonly referred to as (4:1:1), this produces the smallest files. This suits images with weak borders but tends to denature colors.

  Método DCT

    DCT es “transformada discreta del coseno” y es el primer paso que realiza el algoritmo JPEG para ir del dominio espacial al de frecuencias. Las opciones son “coma flotante”, “entero” (por defecto), y “entero rápido” . El método de coma flotante es mucho más preciso que el método entero, pero a la vez es mucho más lento a menos que tu computadora tenga hardware que trabaje rápido con estos números. Además nota que los resultados del método de coma flotante pueden variar un poco de una computadora a otra, mientras que los métodos de enteros deberían dar el mismo resultado siempre. El método de entero rápido es mucho menos preciso que los otros dos.

    - float: The float method is very slightly more accurate than the integer method, but is much slower unless your machine has very fast floating-point hardware. Also note that the results of the floating-point method may vary slightly across machines, while the integer methods should give the same results everywhere.

    - integer (the default): This method is faster than “float”, but not as accurate.

    - fast integer: The fast integer method is much less accurate than the other two.

  Image comments

    In this text box, you can enter a comment which is saved with the image.

#### 1.2.3. Saving as PNG

Figura 6.4. The “Save as PNG” dialog

Interlacing

  Checking interlace allows an image on a web page to be progressively displayed as it is downloaded. Progressive image display is useful with slow connection speeds, because you can stop an image that is of no interest; interlace is of less use today with our faster connection speeds.

Save background color

  If your image has many transparency levels, the Internet browsers that recognize only two levels, will use the background color of your Toolbox instead. Internet Explorer up to version 6 did not use this information.

Save gamma

  Gamma correction is the ability to correct for differences in how computers interpret color values. This saves gamma information in the PNG that reflects the current Gamma factor for your display. Viewers on other computers can then compensate to ensure that the image is not too dark or too bright.

Save layer offset

  PNG supports an offset value called the “oFFs chunk”, which provides position data. Unfortunately, PNG offset support in GIMP is broken, or at least is not compatible with other applications, and has been for a long time. Do not enable offsets, let GIMP flatten the layers before saving, and you will have no problems.

Save Resolution

  Save the image resolution, in DPI (dots per inch).

Save creation time

  Date the file was saved.

Save comment

  You can read this comment in the Image Properties.

Save color values from transparent pixels

  With this option is checked, the color values are saved even if the pixels are completely transparent.

Compression level

  Since compression is not lossy, the only reason to use a compression level less than 9, is if it takes too long to compress a file on a slow computer. Nothing to fear from decompression: it is as quick whatever the compression level.

Save Defaults

  Click to save the current settings. Latter, you can use Load Defaults to load the saved settings.

| Nota
The PNG format supports indexed images. Using fewer colors, therefore, results in a smaller file; this is especially useful for creating web images; see Sección 6.6, “Modo indexado”. Computers work on 8 bits blocks named “Byte”. A byte allows 256 colors. Reducing the number of colors below 256 is not useful: a byte will be used anyway and the file size will not be less. More, this “PNG8” format, like GIF, uses only one bit for transparency; only two transparency levels are possible, transparent or opaque. If you want PNG transparency to be fully displayed by Internet Explorer, you can use the AlphaImageLoader DirectX filter in the code of your Web page. See Microsoft Knowledge Base [MSKB-294714]. Please note, that this is not necessary for InternetExplorer 7 and above.

#### 1.2.4. Saving as TIFF

Figura 6.5. The TIFF Save dialog

Compression

  This option allows you to specify the algorithm used to compress the image.

  - None: is fast, and lossless, but the resulting file is very large.

  - LZW: The image is compressed using the “Lempel-Ziv-Welch” algorithm, a lossless compression technique. This is old, but efficient and fast. More information at [WKPD-LZW].

  - Pack Bits: is a fast, simple compression scheme for run-length encoding of data. Apple introduced the PackBits format with the release of MacPaint on the Macintosh computer. A PackBits data stream consists of packets of one byte of header followed by data. (Source: [WKPD-PACKBITS])

  - Deflate: is a lossless data compression algorithm that uses a combination of the LZ77 algorithm and Huffman coding. It is also used in Zip, Gzip and PNG file formats. Source: [WKPD-DEFLATE].

  - JPEG: is a very good compression algorithm but lossy.

  - CCITT Group 3 fax; CCITT Group 4 fax is a black and white format developed to transfer images by FAX.

    | Nota
    These options can only be selected, if the image is in indexed mode and reduced to two colors. Use Image → Mode → Indexed to convert the image to indexed. Be certain to check “Use black and white (1-bit) palette”.

Save color values from transparent pixels

  With this option the color values are saved even if the pixels are completely transparent.

Comment

  In this text box, you can enter a comment that is associated with the image.

3.8. Navegador de imágenes |  | 2. Preparing your Images for the Web