HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
(resize: resize the image with nicely filtered results)

Functions

ImageBuf OIIO_API ImageBufAlgo::resize (const ImageBuf &src, string_view filtername="", float filterwidth=0.0f, ROI roi={}, int nthreads=0)
 
ImageBuf OIIO_API ImageBufAlgo::resize (const ImageBuf &src, Filter2D *filter, ROI roi={}, int nthreads=0)
 
bool OIIO_API ImageBufAlgo::resize (ImageBuf &dst, const ImageBuf &src, string_view filtername="", float filterwidth=0.0f, ROI roi={}, int nthreads=0)
 
bool OIIO_API ImageBufAlgo::resize (ImageBuf &dst, const ImageBuf &src, Filter2D *filter, ROI roi={}, int nthreads=0)
 

Detailed Description

Set dst, over the region of interest, to be a resized version of the corresponding portion of src (mapping such that the "full" image window of each correspond to each other, regardless of resolution). If dst is not yet initialized, it will be sized according to roi.

The caller may either (a) explicitly pass a reconstruction filter, or (b) specify one by filtername and filterwidth. If filter is nullptr or if filtername is the empty string resize() will choose a reasonable high-quality default (blackman-harris when upsizing, lanczos3 when downsizing). The filter is used to weight the src pixels falling underneath it for each dst pixel; the filter's size is expressed in pixel units of the dst image.

Function Documentation

ImageBuf OIIO_API ImageBufAlgo::resize ( const ImageBuf src,
string_view  filtername = "",
float  filterwidth = 0.0f,
ROI  roi = {},
int  nthreads = 0 
)
ImageBuf OIIO_API ImageBufAlgo::resize ( const ImageBuf src,
Filter2D filter,
ROI  roi = {},
int  nthreads = 0 
)
bool OIIO_API ImageBufAlgo::resize ( ImageBuf dst,
const ImageBuf src,
string_view  filtername = "",
float  filterwidth = 0.0f,
ROI  roi = {},
int  nthreads = 0 
)
bool OIIO_API ImageBufAlgo::resize ( ImageBuf dst,
const ImageBuf src,
Filter2D filter,
ROI  roi = {},
int  nthreads = 0 
)