46 IMG_Stat(
unsigned xres,
unsigned yres);
57 int64 getMemoryUsage(
bool inclusive)
const;
89 unsigned getXres()
const {
return myXres; }
90 unsigned getYres()
const {
return myYres; }
111 int getNumPlanes()
const;
122 int getPlaneIndex(
const char *
name)
const;
133 const char *c0name = 0,
134 const char *c1name = 0,
135 const char *c2name = 0,
136 const char *c3name = 0);
158 void insertPlane(
IMG_Plane *plane,
int beforeindex);
162 void removePlane(
int pindex);
164 void removePlane(
const char *
name);
166 void removeAllPlanes();
170 void reorderPlane(
IMG_Plane *plane,
int beforeindex);
174 void swapPlaneOrder(
int plane_a,
int plane_b);
188 void setDataWindow(
int x1,
int y1,
int x2,
int y2);
189 void clearDataWindow();
194 void getDataWindow(
int &x1,
int &
y1,
195 int &
x2,
int &
y2)
const;
199 bool hasDataWindow()
const;
205 void setBackgroundColor(
fpreal col[4]);
206 void getBackgroundColor(
fpreal col[4])
const;
209 { myDataStreakFlag = streak; }
216 int getDataWidth()
const;
220 int getDataHeight()
const;
240 {
return metadata().find(key, value, metadataKey()); }
252 {
return metadata().begin(); }
254 {
return metadata().end(); }
260 {
return metadata().import(key, val, metadataKey()); }
262 {
return metadata().import(key, val, metadataKey()); }
264 {
return metadata().import(key, val, metadataKey()); }
266 {
return metadata().import(key, val, metadataKey()); }
268 {
return metadata().import(key, val, metadataKey()); }
270 {
return metadata().import(key, val, metadataKey()); }
272 {
return metadata().import(key, val, metadataKey()); }
274 {
return metadata().import(key, val, metadataKey()); }
283 bool pretty_print)
const
285 return metadata().toString(key, value, metadataKey(), pretty_print);
291 {
return metadata().add(key, item); }
307 { metadata().addTypedString(name, val); }
319 static bool splitTextureWrapModes(
const UT_StringRef &wrapmodes,
332 { myDeepStat = deep; }
334 {
return myDeepStat; }
342 int64 getComponentCount()
const;
346 int64 getDeepPixelComponentCount()
const;
350 int64 bytesPerPixel()
const;
354 int64 bytesPerImage()
const;
358 int64 bytesPerScanline()
const;
364 int64 bytesPerPlaneScan(
int i)
const;
373 int planeOffset(
int i)
const;
396 { myMipRoundMode =
mode; }
403 void recomputeOffsets();
405 void init(
int xres,
int yres);
413 fpreal myDataWindowColor[4];
418 int64 myRenderMemory;
420 unsigned myXres, myYres;
425 bool myDataStreakFlag;
426 bool myHasDataWindow;
451 return myScanlineSize;
const IMG_Metadata & metadata() const
bool importMetadata(const UT_StringRef &key, int64 &val) const
fpreal getRenderTime() const
fpreal getAspectRatio() const
IMG_ImageType
Type of image we want to create or have opened.
IMG_Metadata & metadata()
IMG_Plane * getPlane(int i=0) const
Get an image plane by index.
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
int64 getRenderMemory() const
bool importMetadata(const UT_StringRef &key, fpreal64 &val) const
void setResolution(unsigned xres, unsigned yres)
Class which writes ASCII or binary JSON streams.
IMG_MipRoundMode getMipRoundMode() const
bool importMetadata(const UT_StringRef &key, UT_StringHolder &val) const
IMG_ImageType getImageType() const
int64 bytesPerScanline() const
bool importMetadata(const UT_StringRef &key, UT_Matrix4D &val) const
Describes the format and layout of a single plane in an image The plane specifies the format and name...
void setRenderTime(fpreal t)
Sets the render time from the image file.
bool importMetadata(const UT_StringRef &key, fpreal32 &val) const
bool setMetadata(const UT_StringHolder &key, int64 val)
const img_DeepStatPtr & getDeepStat() const
Set how deep samples are interpolated.
IMG_Metadata::const_iterator beginMetadata() const
void setAspectRatio(fpreal aspect)
void setMipRoundMode(IMG_MipRoundMode mode)
bool setMetadata(const UT_StringHolder &key, const UT_StringHolder &val)
int getNumPlanes() const
Returns the number of image planes in the image a plane contains the actual structure of the image da...
bool isEnvMap() const
isEnvMap() will return true, only if the image is an environment map.
bool findMetadata(const UT_StringRef &key, IMG_MetadataItem &value) const
bool getBackgroundStreak() const
const UT_StringHolder & metadataKey() const
Get the format's default metadata key.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
bool metadataAsString(const UT_StringRef &key, UT_StringHolder &value, bool pretty_print) const
IMG_Metadata::const_iterator endMetadata() const
const UT_DimRect & getDataWindow() const
Return the data window for the image.
GLuint const GLchar * name
bool importMetadata(const UT_StringRef &key, bool &val) const
IMG_Plane * addDefaultPlane()
Add a default 8bit, RGBA plane to the image.
IMG_Stat information used when creating deep images.
void setRenderMemory(int64 mem)
Sets the render time from the image file.
exint entries() const
Alias of size(). size() is preferred.
bool setMetadata(const UT_StringHolder &key, const UT_JSONValue &val)
bool importMetadata(const UT_StringRef &key, UT_Matrix4F &val) const
bool setMetadata(const UT_StringHolder &key, const IMG_MetadataItem &item)
void swapPlaneOrder(const IMG_Plane *p, int plane_b)
int getDataHeight() const
__hostdev__ constexpr T pi()
Pi constant taken from Boost to match old behaviour.
bool setMetadata(const UT_StringHolder &key, bool val)
void setMetadataKey(const UT_StringHolder &k)
Set the default metadata key for the format.
void setTypedMetadata(const UT_StringHolder &name, const char *val)
Obsolete interface to set metadata based on a "typed" string.
void setFilename(const char *name)
Class to store JSON objects as C++ objects.
Contains the details of a specific image file, used by IMG_File. This class contains all the high-lev...
GLubyte GLubyte GLubyte GLubyte w
int getPlaneIndex() const
GLdouble GLdouble GLdouble y2
void setBackgroundStreak(bool streak)
const UT_String & getFilename() const
bool setMetadata(const UT_StringHolder &key, fpreal64 val)
IMG_Stat & operator=(const IMG_Stat &s)
bool importMetadata(const UT_StringRef &key, int32 &val) const
int64 bytesPerImage() const
void setNumFrames(int nf)
UT_SharedPtr< IMG_DeepStat > img_DeepStatPtr
void setDeepStat(const img_DeepStatPtr &deep)
Set how deep samples are interpolated.