RingStbImage 関数リファレンス — プログラミング言語 Ring 1.14 取扱説明書

Skip to content

# RingStbImage 関数リファレンス

## はじめに

RingStbImage 拡張機能の関数一覧です。

用例:

    # ライブラリの読み込み
            load "stbimage.ring"
    # 画像の情報
            width=0 height=0 channels=0
    # Ring はプログラム終了後に cData を自動的に解放します
            cData = stbi_load("ring.jpg",:width,:height,:channels,STBI_rgb)
    # 画面へ結果を表示
            ? "Size (bytes): " + len(cData)
            ? "Width : " + width
            ? "Height: " + height
            ? "Channels: " + channels

実行結果:

    Size (bytes): 557371
    Width : 563
    Height: 330
    Channels: 3

## 定数

- STBI_default

- STBI_grey

- STBI_grey_alpha

- STBI_rgb

- STBI_rgb_alpha

## 関数

- stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len,int *x, int *y, int *channels_in_file, int desired_channels)

- stbi_uc *stbi_load(char const *filename, int *x, int *y, int *channels_in_file, int desired_channels)

- stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels)

- stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels)

- stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *channels_in_file, int desired_channels)

- stbi_us *stbi_load_from_file_16(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels)

- float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels)

- float *stbi_loadf(char const *filename, int *x, int *y, int *channels_in_file, int desired_channels)

- float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels)

- void stbi_hdr_to_ldr_gamma(float gamma)

- void stbi_hdr_to_ldr_scale(float scale)

- void stbi_ldr_to_hdr_gamma(float gamma)

- void stbi_ldr_to_hdr_scale(float scale)

- int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)

- int stbi_is_hdr(char const *filename)

- int stbi_is_hdr_from_file(FILE *f)

- const char *stbi_failure_reason(void)

- int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp)

- int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len)

- int stbi_info(char const *filename,int *x,int *y,int *comp)

- int stbi_info_from_file(FILE *f,int *x,int *y,int *comp)

- int stbi_is_16_bit(char const *filename)

- int stbi_is_16_bit_from_file(FILE *f)

- void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply)

- void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert)

- void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip)

- void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip)

- char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)

- char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)

- char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen)

- int stbi_zlib_decode_buffer(char *obuffer,int olen, const char *ibuffer, int ilen)

- char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen)

- int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen)