6장. 김프에서 이미지 내보내기

차례

1. 파일
1.1. Save / Export Images
1.2. File Formats
2. 웹용 이미지 만들기
2.1. 이미지의 최적 크기 및 화질 비율
2.2. 파일 크기 조금 더 줄이기
2.3. 투명한 부분이 있는 이미지 저장하기

1. 파일

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.

1.1. Save / Export Images

[참고] 참고

In former GIMP releases, when you loaded an image in some format, let us say JPG or PNG, the image kept its format and was saved in the same format by Save. With GIMP-2.8, images are loaded, imported, in the XCF format as a new project. For example, a sunflower.png image will be loaded as *[sunflower] (imported)-1.0 (indexed color, 1 layer). The leading asterisk indicates that this file has been changed. This image will be saved as sunflower.xcf by Save. To save this image in a format other than XCF, you must use Export.

When you are finished working with an image, you will want to save the results. (In fact, it is often a good idea to save at intermediate stages too: GIMP is a pretty robust program, but we have heard rumors, possibly apocryphal, that it may have been known on rare and mysterious occasions to crash.) Most of the file formats that GIMP can open, can also be used for saving. There is one file format that is special, though: XCF is GIMP's native format, and is useful because it stores everything about an image (well, almost everything; it does not store undo information). Thus, the XCF format is especially suitable for saving intermediate results, and for saving images to be re-opened later in GIMP. XCF files are not readable by most other programs that display images, so once you have finished, you will probably also want to export the image in a more widely used format, such as JPEG, PNG, TIFF, etc.

1.2. File Formats

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 export 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. It is up to you to understand the capabilities of the format you choose.

Exporting an image does not modify the image itself, so you do not lose anything by exporting. See Export file.

[참고] 참고

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 (an asterisk is in front of the image name).

그림 6.1. Closing warning

Closing warning

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. Export Image as GIF

그림 6.2. The GIF Export dialog

The GIF Export dialog

[주의] 주의

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 저장 옵션
인터레이스(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 설명

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

움직이는 GIF 옵션
무한 반복

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

Delay between frames where 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 where unspecified

동작이 설정되지 않은 프레임의 동작을 설정합니다. 여기에는 다음 세 가지 옵션이 있습니다.

  • 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.

Use delay entered above for all frames

Self-explanatory.

Use disposal entered above for all frames

Self-explanatory.

1.2.2. Export Image as JPEG

JPEG files usually have an extension .jpg, .JPG, or .jpeg. It is a very widely used format, because it compresses images very efficiently, while minimizing the loss of image quality. No other format comes close to achieving the same level of compression. It does not, however, support transparency or multiple layers.

그림 6.3. The JPEG Export dialog

The JPEG Export dialog

JPEG 알고리즘은 굉장히 복잡합니다. 또한 이 메뉴얼에서는 다 설명할 수 없을 정도로 많은 옵션들을 가지고 있습니다. 따라서 JPEG 전문가가 아니라면 화질 값을 조절하는 것 정도만 알아도 될 것입니다.

화질

JPEG 포맷으로 저장을 하면, 0 에서 100 까지의 압축률을 조절할 수 있는 대화 상자가 열립니다. 95 이상은 잘 안 쓰이고, 기본값은 85 로 가장 좋은 결과를 보여주지만, 많은 경우 그보다 이하의 값에서도 큰 화질 저하없이 저장이 가능합니다. JPEG 대화 상자의 이미지 창에 미리보기 보여주기 를 이용하면 값에 따른 화질을 미리 확인해 볼 수 있습니다. 이는 JPEG 의 각 옵션값에 따른 변화를 바로바로 보여주지만 이미지 자체를 변형시키지는 않습니다. 따라서 JPEG 대화 상자를 닫으면 원래의 이미지로 돌아갑니다.

[참고] 참고

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.

원본 이미지의 화질 설정값 사용

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.

이미지를 조금만 변형한 경우, 이 옵션을 사용하면 원본 이미지와 거의 동일한 화질과 크기로 저장할 수 있습니다. 이 옵션은 양자화 단계를 통해 다른 화질 설정을 사용할 때보다 이미지의 손실이 적게 만듭니다.

원본 이미지 파일에서 불러온 화질 설정이 기본값보다 나쁜 경우 원본 이미지의 화질 설정값 사용 옵션을 사용할 수 없습니다. 이는 항상 기본값보다 높은 화질을 얻을 수 있도록 하는 안전장치입니다.

Show 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.)

Keep metadata

If the image you loaded has Exif, XMP, IPTC metadata, they are preserved, and you can keep them or not when exporting to JPEG.

Save thumbnail, Save color profile

Many applications use the small thumbnail image as a quickly available small preview image.

설명

You can edit the comment attached to the image you loaded or write a new one.

Advanced Options

고급 설정에 관한 정보:

최적화

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.

부드럽게

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

Use arithmetic coding

Arithmetic encoding is a form of entropy encoding (a lossless data compression scheme) that, since GIMP-2.10 can be used in exporting as JPEG. Images using arithmetic encoding can be 5 - 10 % smaller. But older softwares may have trouble opening these images.

Use 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.

Interval (MCU rows)

JPEG images are stored as a series of compressed square tiles named MCU (Minimum Coding Unit). You can set the size of these tiles (in pixels).

점진적으로 표시

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).

서브샘플링

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.

DCT 기법

DCT 는 이산 코사인 변환(discrete cosine transform) 의 약자이며 공간 영역을 주파수 영역으로 옮기는 JPEG 알고리즘의 첫번째 과정입니다. 부동형(float), 정수형(integer)(기본값), 빠른 정수형(fast integer) 등의 옵션이 있습니다.

  • 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.

  • 정수형 (기본값) : 이 방식은 부동형 보다 빠르나, 정확도는 떨어집니다.

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

1.2.3. Export Image as PNG

그림 6.4. The Export Image as PNG dialog

The Export Image as PNG dialog

인터레이싱

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.

배경 색상 저장

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.

감마값 저장

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.

레이어 오프셋 저장

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 the image resolution, in ppi (pixels per inch).

생성 시각 저장

Date the file was saved.

설명 저장

이미지 정보창을 통해 이 설명을 볼 수 있습니다.

투명한 픽셀의 색상값 저장

When this option is checked, the color values are saved even if the pixels are completely transparent. But this is possible only with a single layer, not with a merged composition. When a multi-layer image gets exported to a single-layer file format, there is no way GIMP could preserve the color values in the transparent pixels.

Pixelformat

TODO

압축 레벨

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.

Keep metadata

If the image you loaded has Exif, XMP, IPTC metadata, they are preserved, and you can keep them or not when exporting to PNG.

Save Defaults

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

[참고] 참고

The PNG format supports indexed images. Using fewer colors, therefore, results in a smaller file; this is especially useful for creating web images; see 6.6절. “Indexed mode”.

컴퓨터는 8 bit로 이루어진 Byte 를 기본 단위로 동작합니다. 1 byte는 256 색을 지원하는데, 최소 1 byte 이상이 사용되기 때문에 색상수를 256 개 이하로 줄여도 파일 크기를 줄이는데에는 큰 도움이 되지 않습니다. 그리고 PNG8 포맷은 GIF 와 마찬가지로 투명도 여부만 가리도록 투명도에 1 bit 만 사용합니다.

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. Export Image as TIFF

그림 6.5. The TIFF Export dialog

The TIFF Export dialog

압축

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.

    [참고] 참고

    These options can only be selected, if the image is in indexed mode and reduced to two colors. Use ImageModeIndexed to convert the image to indexed. Be certain to check Use black and white (1-bit) palette.

Save layers

Since GIMP-2.10.12, you can save layers when exporting to TIFF.

투명한 픽셀의 색상값 저장

이 옵션을 체크하면, 픽셀이 완전히 투명하더라도 픽셀의 색상값을 저장합니다.

설명

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

Keep metadata

If the image you loaded has Exif, XMP, IPTC metadata, they are preserved, and you can keep them or not when exporting to TIFF.

1.2.5. Export Image as MNG

그림 6.6. Export MNG File Dialog

Export MNG File Dialog

MNG is acronym for Multiple-Image Network Graphics.

The main problem is that Konqueror is the only Web navigator that recognizes the MNG animation format. Please see http://en.wikipedia.org/wiki/Multiple-image_Network_Graphics.