2 * Copyright 2016 Xamarin Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY
11 #ifndef sk_codec_DEFINED
12 #define sk_codec_DEFINED
16 SK_C_PLUS_PLUS_BEGIN_GUARD
18 SK_API size_t sk_codec_min_buffered_bytes_needed();
20 // TODO: png chunk reader
21 SK_API sk_codec_t* sk_codec_new_from_stream(sk_stream_t* stream);
22 SK_API sk_codec_t* sk_codec_new_from_data(sk_data_t* data);
24 SK_API void sk_codec_destroy(sk_codec_t* codec);
25 SK_API void sk_codec_get_info(sk_codec_t* codec, sk_imageinfo_t* info);
26 SK_API sk_colorspace_t* sk_codec_get_color_space(sk_codec_t* codec);
27 SK_API sk_codec_origin_t sk_codec_get_origin(sk_codec_t* codec);
28 SK_API void sk_codec_get_scaled_dimensions(sk_codec_t* codec, float desiredScale, sk_isize_t* dimensions);
29 SK_API void sk_codec_get_valid_subset(sk_codec_t* codec, sk_irect_t* desiredSubset);
30 SK_API sk_encoded_format_t sk_codec_get_encoded_format(sk_codec_t* codec);
31 SK_API sk_codec_result_t sk_codec_get_pixels(sk_codec_t* codec, const sk_imageinfo_t* info, void* pixels, size_t rowBytes, const sk_codec_options_t* options, sk_color_t ctable[], int* ctableCount);
32 SK_API sk_codec_result_t sk_codec_get_pixels_using_defaults(sk_codec_t* codec, const sk_imageinfo_t* info, void* pixels, size_t rowBytes);
35 // TODO: SK_API sk_encodedinfo_t sk_codec_get_encoded_info(sk_codec_t* codec);
38 SK_C_PLUS_PLUS_END_GUARD