19 #define OIIO_IMAGECACHE_SUPPORTS_CLOSE 1
22 #define OIIO_IMAGECACHE_SUPPORTS_GETATTRIBUTETYPE 1
25 #define OIIO_IMAGECACHE_INVALIDATE_FORCE 1
39 class ImageCachePerThreadInfo;
92 static void destroy(
ImageCache* cache,
bool teardown =
false);
356 const void *
val) = 0;
401 void *val)
const = 0;
474 virtual Perthread* create_thread_info() = 0;
477 virtual void destroy_thread_info(
Perthread* thread_info) = 0;
499 thread_info, options);
504 virtual bool good(ImageHandle* file) = 0;
509 virtual ustring filename_from_handle(ImageHandle* handle) = 0;
520 virtual std::string resolve_filename(
const std::string&
filename)
const = 0;
685 virtual bool get_image_info (
ustring filename,
int subimage,
int miplevel,
690 virtual bool get_image_info (ImageHandle *file, Perthread *thread_info,
691 int subimage,
int miplevel,
718 int subimage=0,
int miplevel=0,
723 virtual bool get_imagespec (ImageHandle *file, Perthread *thread_info,
725 int subimage=0,
int miplevel=0,
756 int miplevel=0,
bool native=
false) = 0;
760 virtual const ImageSpec *imagespec (ImageHandle *file,
761 Perthread *thread_info,
762 int subimage=0,
int miplevel=0,
785 virtual bool get_thumbnail (ImageHandle *file, Perthread *thread_info,
786 ImageBuf& thumbnail,
int subimage=0) = 0;
837 int subimage,
int miplevel,
int xbegin,
int xend,
838 int ybegin,
int yend,
int zbegin,
int zend,
842 int cache_chbegin = 0,
int cache_chend = -1) = 0;
846 virtual bool get_pixels (ImageHandle *file, Perthread *thread_info,
847 int subimage,
int miplevel,
int xbegin,
int xend,
848 int ybegin,
int yend,
int zbegin,
int zend,
852 int cache_chbegin = 0,
int cache_chend = -1) = 0;
857 int xbegin,
int xend,
int ybegin,
int yend,
858 int zbegin,
int zend,
863 virtual bool get_pixels (ImageHandle *file, Perthread *thread_info,
864 int subimage,
int miplevel,
865 int xbegin,
int xend,
int ybegin,
int yend,
866 int zbegin,
int zend,
891 virtual void invalidate(ImageHandle* file,
bool force =
true) = 0;
903 virtual void invalidate_all(
bool force =
false) = 0;
913 virtual void close_all () = 0;
917 typedef pvt::ImageCacheTile
Tile;
929 int chbegin = 0,
int chend = -1) = 0;
936 int subimage,
int miplevel,
938 int chbegin = 0,
int chend = -1) = 0;
942 virtual void release_tile(
Tile* tile)
const = 0;
946 virtual TypeDesc tile_format(
const Tile* tile)
const = 0;
950 virtual ROI tile_roi(
const Tile* tile)
const = 0;
1005 int x,
int y,
int z,
int chbegin,
int chend,
1022 virtual std::string
geterror(
bool clear =
true)
const = 0;
1029 virtual std::string getstats(
int level = 1)
const = 0;
1036 virtual void reset_stats() = 0;
1049 void operator delete(
void* ) {}
OIIO_API std::string geterror(bool clear=true)
OIIO_API bool has_error()
Is there a pending global error message waiting to be retrieved?
GT_API const UT_StringHolder filename
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
pvt::ImageCacheFile ImageHandle
GLdouble GLdouble GLdouble z
**But if you need a result
GLint GLint GLsizei GLint GLenum GLenum type
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
GLint GLint GLsizei GLint GLenum format
GLuint const GLchar * name
OIIO_API bool getattribute(string_view name, TypeDesc type, void *val)
SIM_API const UT_StringHolder force
const stride_t AutoStride
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
pvt::ImageCachePerThreadInfo Perthread
#define OIIO_NAMESPACE_END
std::string OIIO_UTIL_API utf16_to_utf8(const std::wstring &utf16str) noexcept
ImageHandle * get_image_handle(const std::wstring &filename, Perthread *thread_info=nullptr, const TextureOpt *options=nullptr)
Get an ImageHandle using a UTF-16 encoded wstring filename.
#define OIIO_NAMESPACE_BEGIN