1.12
detail/image.h
1/*
2 * Copyright (C) 2018 Microchip Technology Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef EGT_DETAIL_IMAGE_H
7#define EGT_DETAIL_IMAGE_H
8
14#include <egt/detail/meta.h>
15#include <egt/surface.h>
16#include <string>
17
18namespace egt
19{
20inline namespace v1
21{
22namespace detail
23{
24
28EGT_API Surface load_image_from_memory(const unsigned char* data,
29 size_t len,
30 const std::string& name = {},
31 float hscale = 1.0, float vscale = 1.0);
32
37EGT_API Surface load_image_from_resource(const std::string& name,
38 float hscale = 1.0, float vscale = 1.0);
39
43EGT_API Surface load_image_from_filesystem(const std::string& path,
44 float hscale = 1.0, float vscale = 1.0);
45
49EGT_API Surface load_image_from_network(const std::string& url,
50 float hscale = 1.0, float vscale = 1.0);
51
59EGT_API std::string get_mime_type(const std::string& path);
60
68EGT_API std::string get_mime_type(const void* buffer, size_t length);
69
70}
71}
72}
73
74#endif
Definition surface.h:34
EGT_API Surface load_image_from_memory(const unsigned char *data, size_t len, const std::string &name={}, float hscale=1.0, float vscale=1.0)
Load an image from memory.
EGT_API Surface load_image_from_resource(const std::string &name, float hscale=1.0, float vscale=1.0)
Load an image from ResourceManager.
EGT_API Surface load_image_from_network(const std::string &url, float hscale=1.0, float vscale=1.0)
Load an image from the network.
EGT_API std::string get_mime_type(const std::string &path)
Return the mime type string for a file.
EGT_API Surface load_image_from_filesystem(const std::string &path, float hscale=1.0, float vscale=1.0)
Load an image from the filesystem.
EGT framework namespace.
Definition animation.h:24