2.3. 투명한 부분이 있는 이미지 저장하기

There are two different approaches used by graphic file formats for supporting transparent image areas: simple binary transparency and alpha transparency. Simple binary transparency is supported in the GIF format; one color from the indexed color palette is marked as the transparent color. Alpha transparency is supported in the PNG format; the transparency information is stored in a separate channel, the Alpha channel.

[참고] 참고

The GIF format is rarely used because PNG supports all the features of GIF with additional features (e.g., alpha transparency). Nevertheless, GIF is still used for animations.

절차 6.1. 알파 투명도를 가진 이미지 만들기

  1. 여기에서도 전 과정과 마찬가지로 김프 마스코트인 윌버 이미지를 예제로 사용합니다.

    그림 6.9. RGBA 모드로 열린 윌버 그림

    RGBA 모드로 열린 윌버 그림

  2. To save an image with alpha transparency, you must have an alpha channel. To check if the image has an alpha channel, go to the channel dialog and verify that an entry for Alpha exists, besides Red, Green and Blue. If this is not the case, add a new alpha channel from the layers menu; Layer+TransparencyAdd Alpha Channel.

  3. The original XCF file contains background layers that you can remove. GIMP comes with standard filters that supports creating gradients; look under Filters+Light and Shadow. You are only limited by your imagination. To demonstrate the capabilities of alpha transparency, a soft glow in the background around Wilber is shown.

  4. 모든 작업을 완료하였으면 PNG 포맷 으로 저장합니다.

그림 6.10. 투명한 부분이 포함된 윌버 그림

투명한 부분이 포함된 윌버 그림

배경 레이어에 있는 회색의 체크 무늬는 이미지의 투명한 영역을 표시하며, 김프로 작업하는 동안에 보여집니다.