23#ifndef VCL_IO_IMAGE_STB_LOAD_H
24#define VCL_IO_IMAGE_STB_LOAD_H
26#include <vclib/io/file_info.h>
30#pragma clang diagnostic push
31#pragma clang diagnostic ignored "-Wdeprecated-declarations"
37#pragma clang diagnostic pop
46inline std::set<FileFormat> loadImageFormats()
49 FileFormat(
"png",
"Portable Network Graphics"),
50 FileFormat(
"bmp",
"Bitmap"),
51 FileFormat(
"tga",
"Truevision TGA"),
53 std::vector<std::string> {
"jpg",
"jpeg"},
54 "Joint Photographic Experts Group"),
58inline std::shared_ptr<unsigned char> loadImageData(
59 const std::string& filename,
63 std::shared_ptr<unsigned char> ptr(
64 stbi_load(filename.c_str(), &w, &h,
nullptr, 4), stbi_image_free);