Skia : 2D graphic library

Skia

Skibitmap overview

안드로이드, 크롬에서 사용되는 google에서 support하는 2D graphic library이다. 주요 지원되는 파일 종류는 BMP, GIF, ICO, jpeg, png, bmp, ebp 등이다. Google에서 관리하고 운영되는 open source이다.

Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms. It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.
Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source.

Performance & support

방대한 그래픽 라이브러리라서 API 쓰는 방법 자체도 조금 만만치 않고, 일반 사용자용은 아닌 것으로 보인다. 대부분의 third-party가 native한 그래픽 decode library인 libpng, libjpeg, libwebp 등을 쓰고 있어서 성능은 거의 최강급으로 보인다.

In skia/include/images/SkImageDecoder.h file, there is the image list decoding supported by Skia:

1
2
3
4
5
6
7
8
9
10
11
12
enum Format {
kUnknown_Format,
kBMP_Format,
kGIF_Format,
kICO_Format,
kJPEG_Format,
kPNG_Format,
kWBMP_Format,
kWEBP_Format,
kLastKnownFormat = kWEBP_Format
};

간단한 사용방법

파일을 bitmap으로 최종변환하기 위해서는 내부적으로 정의된 SkBitmap 클래스를 사용해서 decoding을 해야 한다. 추후에 샘플 코드를 작성해서 올리도록 하겠다.

Skia Graphics Engine Wikipedia
Skia official page
Sk codec test page
Skbitmap test page

Share Comments