24 #ifndef PXR_IMAGING_HIO_IMAGE_H
25 #define PXR_IMAGING_HIO_IMAGE_H
121 SourceColorSpace::Auto,
122 bool suppressErrors =
false);
129 int const cropBottom,
172 template <
typename T>
187 bool suppressErrors) = 0;
192 template <
typename T>
221 #endif // PXR_IMAGING_HIO_IMAGE_H
bool GetMetadata(TfToken const &key, T *value) const
}@
virtual bool IsColorSpaceSRGB() const =0
Returns whether the image is in the sRGB color space.
virtual HioFormat GetFormat() const =0
Returns the destination HioFormat.
GT_API const UT_StringHolder filename
virtual bool _OpenForWriting(std::string const &filename)=0
}@
T const & UncheckedGet() const &
HioImage & operator=(const HioImage &)=delete
getFileOption("OpenEXR:storage") storage
virtual bool _OpenForReading(std::string const &filename, int subimage, int mip, SourceColorSpace sourceColorSpace, bool suppressErrors)=0
}@
virtual bool ReadCropped(int const cropTop, int const cropBottom, int const cropLeft, int const cropRight, StorageSpec const &storage)=0
Reads the cropped sub-image into storage.
GLsizei const GLchar *const * string
static HIO_API HioImageSharedPtr OpenForWriting(std::string const &filename)
Opens filename for writing from the given storage.
static HIO_API HioImageSharedPtr OpenForReading(std::string const &filename, int subimage=0, int mip=0, SourceColorSpace sourceColorSpace=SourceColorSpace::Auto, bool suppressErrors=false)
Base class of all factory types.
GLint GLsizei GLsizei height
virtual int GetBytesPerPixel() const =0
Returns the number of bytes per pixel.
virtual HioImageSharedPtr New() const
bool any(const vbool4 &v)
virtual int GetWidth() const =0
Returns the image width.
virtual bool Read(StorageSpec const &storage)=0
Reads the image file into storage.
GLint GLint GLsizei GLint GLenum format
virtual bool GetSamplerMetadata(HioAddressDimension dim, HioAddressMode *param) const =0
}@
virtual std::string const & GetFilename() const =0
}@
GLint GLint GLsizei GLsizei GLsizei depth
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
std::shared_ptr< class HioImage > HioImageSharedPtr
virtual bool Write(StorageSpec const &storage, VtDictionary const &metadata=VtDictionary())=0
Writes the image with metadata.
#define PXR_NAMESPACE_CLOSE_SCOPE
virtual int GetNumMipLevels() const =0
Returns the number of mips available.
virtual int GetHeight() const =0
Returns the image height.
static HIO_API bool IsSupportedImageFile(std::string const &filename)
Returns whether filename opened as a texture image.
virtual HIO_API ~HioImage()