24 {
25 if (argc != 2) {
27 return 1;
28 }
29
31 if (!input || !input->isValid()) {
33 return 1;
34 }
35
37
38 std::unique_ptr<SkCodec> codec = nullptr;
55 } else {
56 printf(
"Unsupported file format\n");
57 return 1;
58 }
59
61 printf(
"Image is %d by %d pixels.\n",
info.width(),
info.height());
62
63 return 0;
64}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static sk_sp< SkData > MakeFromStream(SkStream *, size_t size)
static std::unique_ptr< SkFILEStream > Make(const char path[])
SK_API bool IsBmp(const void *, size_t)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API bool IsGif(const void *, size_t)
SK_API bool IsIco(const void *, size_t)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API bool IsJpeg(const void *, size_t)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API bool IsJpegxl(const void *, size_t)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API bool IsPng(const void *, size_t)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
SK_API bool IsWbmp(const void *, size_t)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API bool IsWebp(const void *, size_t)
std::shared_ptr< const fml::Mapping > data