Enrollment 28.2.0
Loading...
Searching...
No Matches
Image::ImageResampler Class Referenceabstract

Image resampler for DPI-change operations, including upsampling and downsampling. More...

#include <Image.h>

Collaboration diagram for Image::ImageResampler:

Public Member Functions

 ImageResampler (ImageDpi targetDpi)
 Constructs an image resampler for a target DPI.
virtual std::shared_ptr< Image > Resample (const inno::Image &image) const =0
 Resample image to a target DPI.

Protected Member Functions

ImageDpi GetDpi () const
 Retrieves target DPI of the resampler.

Detailed Description

Image resampler for DPI-change operations, including upsampling and downsampling.

Constructor & Destructor Documentation

◆ ImageResampler()

ImageResampler ( ImageDpi targetDpi)
inlineexplicit

Constructs an image resampler for a target DPI.

This constructor initializes the image resampler to resample an image to the specified DPI.

Parameters
targetDpiThe DPI (dots per inch) of the new image.
Exceptions
EnrollmentInvalidArgumentExceptionwhen targetDpi is 0

Referenced by Image::AreaImageResampler::AreaImageResampler(), Image::BicubicImageResampler::BicubicImageResampler(), Image::NISTImageResampler::NISTImageResampler(), Image::NISTImageResampler::NISTImageResampler(), and Resample().

Here is the caller graph for this function:

Member Function Documentation

◆ GetDpi()

ImageDpi GetDpi ( ) const
inlinenodiscardprotected

Retrieves target DPI of the resampler.

Returns
The target DPI (dots per inch) of the resampler

Referenced by Image::AreaImageResampler::Resample(), Image::BicubicImageResampler::Resample(), and Image::NISTImageResampler::Resample().

Here is the caller graph for this function:

◆ Resample()

virtual std::shared_ptr< Image > Resample ( const inno::Image & image) const
nodiscardpure virtual

Resample image to a target DPI.

It creates new image as result of resampling with factor target DPI/original DPI.

Parameters
imageImage to resize.
Returns
image with given DPI

Implemented in Image::AreaImageResampler, Image::BicubicImageResampler, and Image::NISTImageResampler.

References ImageResampler().

Referenced by Image::ChangeDpiTo().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: