12#include "enrollment/Export.h"
49 static std::shared_ptr<Image>
Decode(
const std::vector<uint8_t>& imageData)
66 static std::shared_ptr<Image>
Decode(
const std::vector<uint8_t>& imageData,
unsigned int dpi)
83 static std::shared_ptr<Image>
Decode(
const std::vector<uint8_t>& imageData,
84 std::shared_ptr<ImageExecutor> executor)
86 return Decode(imageData,
static_cast<unsigned int>(
DefaultDpi), std::move(executor));
101 static std::shared_ptr<Image>
Decode(
const std::vector<uint8_t>& imageData,
103 std::shared_ptr<ImageExecutor> executor)
105 if (executor ==
nullptr)
112 auto* impl = executor->Create(imageData.data(), imageData.size(), dpi, ThrowOnError{});
121 return SharedImage(impl, std::move(encoder), std::move(executor));
147 auto result =
static_cast<Intersection>(exec->IntersectionRectangle(impl.get(),
171 exec->IntersectionCircle(impl.get(), circle.
center.
x, circle.
center.
y, circle.
radius, ThrowOnError{}));
185 static_cast<Intersection>(exec->IntersectionPoint(impl.get(), point.
x, point.
y, ThrowOnError{}));
203 std::shared_ptr<ImageEncoder> originalEncoder =
nullptr,
206 auto* impl = executor->CreateRaw(
209 if (originalEncoder !=
nullptr)
211 return SharedImage(impl, std::move(originalEncoder), std::move(executor));
214 std::shared_ptr<ImageEncoder> encoder = std::make_shared<IRawImageEncoder>();
216 return SharedImage(impl, std::move(encoder), std::move(executor));
229 auto type = inno_local_Image_DeduceType(imageData.data(), imageData.size(), ThrowOnError{});
241 return ImageDpi{ exec->Dpi(impl.get()) };
250 return exec->Width(impl.get());
259 return exec->Height(impl.get());
268 return originalEncoder;
278 auto size = exec->RawSize(impl.get());
279 std::vector<uint8_t> raw(size, 0);
280 unsigned int type = 0;
282 exec->ToRaw(impl.get(), raw.data(), size, &type, ThrowOnError{});
296 std::vector<uint8_t> raw(size, 0);
311 std::vector<uint8_t> raw(size, 0);
322 [[nodiscard]] std::shared_ptr<Image>
AsBGR()
const
337 std::vector<uint8_t> raw(size, 0);
348 [[nodiscard]] std::shared_ptr<Image>
AsBGRA()
const
364 return encoder.
Encode(raw);
386 void SaveAs(
const std::string& path)
const
403 if (exec ==
nullptr && right.exec ==
nullptr)
408 if (exec == right.exec)
411 auto result = exec->IsEqual(impl.get(), right.impl.get(), ThrowOnError{});
415 if (exec !=
nullptr && right.exec !=
nullptr)
420 return raw == rightRaw;
438 auto* newImpl = exec->Clone(impl.get(), ThrowOnError{});
440 ImplDrawer drawer(newImpl, exec);
442 drawer.DrawingFinished();
443 return SharedImage(newImpl, originalEncoder, exec);
498 const RGBA& background,
506 auto* newImpl = exec->CropRectangle(impl.get(),
523 return SharedImage(newImpl, originalEncoder, exec);
544 if (
static_cast<unsigned int>(targetDpi) == 0)
556 [[nodiscard]]
virtual std::shared_ptr<Image>
Resample(
const inno::Image& image)
const = 0;
608 [[nodiscard]] std::shared_ptr<Image>
Resample(
const inno::Image& image)
const final
611 image.exec->ChangeDpi(image.impl.get(),
static_cast<unsigned int>(
GetDpi()), ThrowOnError{});
613 return SharedImage(newImpl, image.originalEncoder, image.exec);
657 [[nodiscard]] std::shared_ptr<Image>
Resample(
const inno::Image& image)
const final
660 image.exec->ChangeDpiArea(image.impl.get(),
static_cast<unsigned int>(
GetDpi()), ThrowOnError{});
662 return SharedImage(newImpl, image.originalEncoder, image.exec);
749 , interpolation(interpolationMethod)
762 std::to_string(
static_cast<int>(i)) +
")");
765 const auto checkFilterValueIsValid = [](
FilterType f)
775 std::to_string(
static_cast<int>(f)) +
")");
778 checkInterpolationValueIsValid(interpolationMethod);
779 checkFilterValueIsValid(filterType);
791 [[nodiscard]] std::shared_ptr<Image>
Resample(
const inno::Image& image)
const final
793 if (
GetDpi() == image.Dpi())
797 if (image.Channels() > 1)
800 "Only grayscale images are supported by NIST resampling algorithm");
804 if (interpolation.has_value() && filter.has_value())
806 newImpl = image.exec->ChangeDpiNistWithOptions(image.impl.get(),
807 static_cast<unsigned int>(
GetDpi()),
808 static_cast<unsigned int>(interpolation.value()),
809 static_cast<unsigned int>(filter.value()),
815 image.exec->ChangeDpiNist(image.impl.get(),
static_cast<unsigned int>(
GetDpi()), ThrowOnError{});
817 return SharedImage(newImpl, image.originalEncoder, image.exec);
828 std::optional<InterpolationMethod> interpolation;
829 std::optional<FilterType> filter;
870 [[nodiscard]] std::shared_ptr<Image>
Resize(
float factor)
const
877 auto* newImpl = exec->Resize(impl.get(), factor, ThrowOnError{});
879 return SharedImage(newImpl, originalEncoder, exec);
894 auto actualMaxDimension = std::max(
Width(),
Height());
895 if (actualMaxDimension <= maxDimension)
899 auto result = SharedImage(exec->Clone(impl.get(), ThrowOnError{}), originalEncoder, exec);
904 if (maxDimension == 0)
906 return SharedImage(
nullptr, originalEncoder, exec);
909 auto factor =
static_cast<float>(maxDimension) /
static_cast<float>(actualMaxDimension);
964 const RGBA& background,
967 auto* newImpl = exec->CropAlignedRectangle(impl.get(),
986 return SharedImage(newImpl, originalEncoder, exec);
1001 const RGBA& background = Colors::White)
const
1008 auto* newImpl = exec->CropCircle(impl.get(),
1012 background.color.red,
1013 background.color.green,
1014 background.color.blue,
1015 background.transparency,
1018 return SharedImage(newImpl, originalEncoder, exec);
1032 auto* maskerImpl = exec->CreateMasker(impl.get(), ThrowOnError{});
1033 ImplMasker masker(maskerImpl, exec);
1035 auto* newImageImpl = masker.GetMaskedImage();
1036 return SharedImage(newImageImpl, originalEncoder, exec);
1047 [[nodiscard]]
size_t Channels()
const
1049 const size_t numOfChannels = exec->Channels(impl.get(), ThrowOnError{});
1050 return numOfChannels;
1055 Image& operator=(
const Image& image) =
delete;
1061 std::unique_ptr<void, void (*)(
void*)> impl;
1062 std::shared_ptr<ImageEncoder> originalEncoder;
1063 std::shared_ptr<ImageExecutor> exec;
1064 static constexpr size_t MaxErrorMessage = 200;
1066 Image(
void* i, std::shared_ptr<ImageEncoder> encoder, std::shared_ptr<ImageExecutor> e)
1067 : impl(i, e->Destroy())
1068 , originalEncoder(std::move(encoder))
1069 , exec(std::move(e))
1073 static std::shared_ptr<Image> SharedImage(
void* i,
1074 std::shared_ptr<ImageEncoder> encoder,
1075 std::shared_ptr<ImageExecutor> e)
1077 return std::shared_ptr<Image>(
new Image(i, std::move(encoder), std::move(e)));
1080 class ImplDrawer :
public ImageShapeDrawer
1083 void DrawLine(
const Line& line,
const ImageShapeAttributes& attr)
final
1085 exec->DrawLine(impl,
1090 attr.rgba.color.red,
1091 attr.rgba.color.green,
1092 attr.rgba.color.blue,
1093 attr.rgba.transparency,
1098 void DrawCircle(
const Circle& circle,
const ImageShapeAttributes& attr)
final
1100 exec->DrawCircle(impl,
1104 attr.rgba.color.red,
1105 attr.rgba.color.green,
1106 attr.rgba.color.blue,
1107 attr.rgba.transparency,
1112 void DrawRectangle(
const Rectangle& rect,
const ImageShapeAttributes& attr)
final
1114 DrawLine(Line{ rect.GetTopLeft(), rect.GetTopRight() }, attr);
1115 DrawLine(Line{ rect.GetTopRight(), rect.GetBottomRight() }, attr);
1116 DrawLine(Line{ rect.GetBottomRight(), rect.GetBottomLeft() }, attr);
1117 DrawLine(Line{ rect.GetBottomLeft(), rect.GetTopLeft() }, attr);
1120 void DrawingFinished()
1122 exec->DrawingFinished(impl, ThrowOnError{});
1125 ImplDrawer(
void* imageImpl, std::shared_ptr<ImageExecutor> e)
1127 , exec(std::move(e))
1131 ImplDrawer() =
delete;
1132 ImplDrawer(
const ImplDrawer&) =
delete;
1133 ImplDrawer(ImplDrawer&&) =
delete;
1134 ImplDrawer& operator=(
const ImplDrawer&) =
delete;
1135 ImplDrawer& operator=(ImplDrawer&&) =
delete;
1136 virtual ~ImplDrawer() =
default;
1140 std::shared_ptr<ImageExecutor> exec;
1143 class ImplMasker final :
public ImageMasker
1146 void MaskCircle(
const Circle& circle,
const class ImageMaskConfiguration& conf)
final
1149 exec->MaskCircle(impl.get(),
1152 static_cast<unsigned int>(circle.radius),
1153 conf.GetMaskColor().color.red,
1154 conf.GetMaskColor().color.green,
1155 conf.GetMaskColor().color.blue,
1156 conf.GetMaskColor().transparency,
1157 static_cast<unsigned int>(conf.GetMaskType()),
1161 void MaskPolygon(
const Polygon& polygon,
const class ImageMaskConfiguration& conf)
final
1163 const auto& pp = polygon.GetPoints();
1164 std::vector<int> polygonX(pp.size());
1165 std::vector<int> polygonY(pp.size());
1166 for (
auto x = polygonX.begin(), y = polygonY.begin();
const auto& p : pp)
1174 exec->MaskPolygon(impl.get(),
1178 conf.GetMaskColor().color.red,
1179 conf.GetMaskColor().color.green,
1180 conf.GetMaskColor().color.blue,
1181 conf.GetMaskColor().transparency,
1182 static_cast<unsigned int>(conf.GetMaskType()),
1189 exec->BlurCircle(impl.get(),
1192 static_cast<unsigned int>(circle.radius),
1193 static_cast<unsigned int>(maskType),
1194 static_cast<unsigned int>(blurType),
1200 const auto& pp = polygon.GetPoints();
1201 std::vector<int> polygonX(pp.size());
1202 std::vector<int> polygonY(pp.size());
1203 for (
auto x = polygonX.begin(), y = polygonY.begin();
const auto& p : pp)
1211 exec->BlurPolygon(impl.get(),
1215 static_cast<unsigned int>(maskType),
1216 static_cast<unsigned int>(blurType),
1220 void AddToBlur(
const Circle& circle,
ImageMaskType maskType)
final
1223 exec->AddCircleToBlurMask(impl.get(),
1226 static_cast<unsigned int>(circle.radius),
1227 static_cast<unsigned int>(maskType),
1231 void AddToBlur(
const Polygon& polygon,
ImageMaskType maskType)
final
1233 const auto& pp = polygon.GetPoints();
1234 std::vector<int> polygonX(pp.size());
1235 std::vector<int> polygonY(pp.size());
1236 for (
auto x = polygonX.begin(), y = polygonY.begin();
const auto& p : pp)
1244 exec->AddPolygonToBlurMask(impl.get(),
1248 static_cast<unsigned int>(maskType),
1255 exec->ApplyBlur(impl.get(),
static_cast<unsigned int>(blurType), ThrowOnError{});
1258 [[nodiscard]]
void* GetMaskedImage()
const
1261 auto* newImage = exec->MaskingFinished(impl.get(), ThrowOnError{});
1266 ImplMasker(
void* imageImpl, std::shared_ptr<ImageExecutor> e)
1267 : impl(imageImpl, e->DestroyMask())
1268 , exec(std::move(e))
1272 ImplMasker() =
delete;
1273 ImplMasker(
const ImplMasker&) =
delete;
1274 ImplMasker(ImplMasker&&) =
delete;
1275 ImplMasker& operator=(
const ImplMasker&) =
delete;
1276 ImplMasker& operator=(ImplMasker&&) =
delete;
1277 virtual ~ImplMasker() =
default;
1280 std::unique_ptr<void, void (*)(
void*)> impl;
1281 std::shared_ptr<ImageExecutor> exec;
constexpr ImageDpi DefaultDpi
Provides default DPI Default DPI is 500.
Definition ImageAttribute.h:107
It holds circle dimensions.
Definition ImageAttribute.h:691
Point center
top left
Definition ImageAttribute.h:694
Radius radius
top right
Definition ImageAttribute.h:696
Base exception for all enrollment-sdk invalid argument exceptions.
Definition EnrollmentException.h:96
static std::shared_ptr< ImageExecutor > Get()
Provides current executor.
Definition ImageExecutor.h:1570
It holds width and height of Image.
Definition ImageAttribute.h:281
ImageWidth width
width
Definition ImageAttribute.h:295
ImageHeight height
height
Definition ImageAttribute.h:297
Image DPI.
Definition ImageAttribute.h:47
Interface for image formatting converting to ImageType.
Definition ImageEncoder.h:106
static std::shared_ptr< ImageEncoder > Create(ImageType type)
Create concrete default encoder for given type.
Definition ImageEncoder.h:881
virtual std::vector< uint8_t > Encode(const RawImage &raw) const =0
Encodes given RawImage as encoded image.
Exception for image processing.
Definition ImageException.h:24
@ DECODE_IMAGE
Image type is supported but image format is corrupted.
Definition ImageException.h:39
Saves image to file.
Definition ImageEncoder.h:933
Defines the interface for applying mask to the image with a masker.
Definition ImageMask.h:193
virtual void MaskWith(ImageMasker &masker) const =0
Applies a mask to the image using the provided ImageMasker.
Interface for image saving.
Definition ImageEncoder.h:911
virtual void Save(const RawImage &raw) const =0
Encodes and saves given image.
Any type of shape that wants to be drawn.
Definition ImageShape.h:142
virtual void DrawIn(ImageShapeDrawer &drawer) const =0
It draws shape in ImageShapeDrawer.
It contains all supported image types.
Definition ImageType.h:21
Image resampler for DPI-change operations, including upsampling and downsampling using area interpola...
Definition Image.h:629
AreaImageResampler(ImageDpi targetDpi)
Constructs pixel-area-relation interpolation image resampler for a target DPI.
Definition Image.h:641
std::shared_ptr< Image > Resample(const inno::Image &image) const final
Resample image to a target DPI using pixel-area-relation interpolation.
Definition Image.h:656
Image resampler for DPI-change operations, including upsampling and downsampling using bicubic interp...
Definition Image.h:584
std::shared_ptr< Image > Resample(const inno::Image &image) const final
Resample image to a target DPI using bicubic interpolation.
Definition Image.h:607
BicubicImageResampler(ImageDpi targetDpi)
Constructs bicubic interpolation image resampler for a target DPI.
Definition Image.h:595
Image resampler for DPI-change operations, including upsampling and downsampling.
Definition Image.h:530
ImageResampler(ImageDpi targetDpi)
Constructs an image resampler for a target DPI.
Definition Image.h:540
ImageDpi GetDpi() const
Retrieves target DPI of the resampler.
Definition Image.h:569
virtual std::shared_ptr< Image > Resample(const inno::Image &image) const =0
Resample image to a target DPI.
Image resampler for DPI-change operations, including upsampling and downsampling using NIST-compliant...
Definition Image.h:678
std::shared_ptr< Image > Resample(const inno::Image &image) const final
Resample image to a target DPI using NIST resamling algorithm.
Definition Image.h:790
InterpolationMethod
Enum defines possible types of interpolation methods to apply during image resampling.
Definition Image.h:682
@ BILINEAR
Apply bilinear interpolation.
Definition Image.h:686
@ BICUBIC
Apply bicubic interpolation.
Definition Image.h:684
NISTImageResampler(ImageDpi targetDpi, InterpolationMethod interpolationMethod, FilterType filterType)
Constructs a NIST-compliant image resampler for a target DPI using a custom interpolation method and ...
Definition Image.h:746
NISTImageResampler(ImageDpi targetDpi)
Constructs a NIST-compliant image resampler for a target DPI.
Definition Image.h:713
FilterType
Enum defines possible types of filtering methods to apply before image resampling.
Definition Image.h:691
@ IDEAL
Apply an ideal filter for sharpness.
Definition Image.h:695
@ GAUSSIAN
Apply a Gaussian filter for smoothing.
Definition Image.h:693
Image representation.
Definition Image.h:34
std::shared_ptr< Image > CropAlignedRectangle(const Rectangle &r, const RGBA &background, const ImageDimensions &dimension) const
Crop rectangle and align given top left rectangle point to coordinates [0,0] in new image.
Definition Image.h:962
void SaveIn(ImageSaver &saver) const
Save Image in given ImageSaver.
Definition Image.h:371
std::shared_ptr< Image > Resize(float factor) const
Resize image to new image.
Definition Image.h:869
Intersection CircleIntersection(const Circle &circle) const
Check intersection between circle and image.
Definition Image.h:167
std::shared_ptr< Image > MaskImageBy(const ImageMask &mask) const
Applies the specified mask to the image, creating a new masked image.
Definition Image.h:1029
static std::shared_ptr< Image > DecodeRawImage(const RawImage &raw, std::shared_ptr< ImageEncoder > originalEncoder=nullptr, std::shared_ptr< ImageExecutor > executor=GlobalImageExecutor::Get())
Creates Image from raw data.
Definition Image.h:200
size_t Channels() const
Returns the number of channels in the image.
Definition Image.h:1046
std::shared_ptr< Image > CropRectangle(const Rectangle &r) const
Crops a rectangle from the image, using a white background for any extra space.
Definition Image.h:458
std::shared_ptr< Image > CropRectangle(const Rectangle &r, const RGBA &background, const ImageDimensions &dimension) const
Crops a rectangle and places it on a canvas of specified dimensions, using a specified background col...
Definition Image.h:496
std::shared_ptr< ImageEncoder > OriginalEncoder() const
Provides original encoder to encode image to original format.
Definition Image.h:265
bool operator==(const Image &right) const
Images are equal when has same dimensions and same content.
Definition Image.h:400
std::shared_ptr< Image > CropCircle(const Circle &circle, const RGBA &background=Colors::White) const
Copy circle to new image.
Definition Image.h:999
ImageDpi Dpi() const
Returns image dpi.
Definition Image.h:238
static std::shared_ptr< Image > Decode(const std::vector< uint8_t > &imageData)
Creates Image from image data with 500 DPI.
Definition Image.h:48
ImageHeight Height() const
Returns image height.
Definition Image.h:256
std::shared_ptr< Image > ChangeDpiTo(ImageDpi targetDpi) const
Create image with given DPI.
Definition Image.h:855
static std::shared_ptr< Image > Decode(const std::vector< uint8_t > &imageData, std::shared_ptr< ImageExecutor > executor)
Creates Image from image data with 500 DPI.
Definition Image.h:82
Intersection
Enum define possible intersection of Image and some Object e.g. Rectangle, Circle.
Definition Image.h:125
@ INSIDE
Object is fully in Image.
Definition Image.h:129
@ OUTSIDE
Image is fully in Object.
Definition Image.h:131
@ NO
Image and Object has no intersection.
Definition Image.h:133
@ SAME
Image has same dimensions and vertices coordinates as Object.
Definition Image.h:135
@ PARTIAL
The Object and Image has intersection.
Definition Image.h:127
std::shared_ptr< Image > AsBGRA() const
Converts image to BGRA format.
Definition Image.h:347
std::shared_ptr< Image > ChangeDpiTo(const ImageResampler &resampler) const
Create image using provided DPI-change configuration.
Definition Image.h:841
static ImageType DeduceType(const std::vector< uint8_t > &imageData)
Deduce image type from image content.
Definition Image.h:226
RawImage AsRawGrayscale() const
Converts image to raw grayscale format.
Definition Image.h:291
RawImage AsRawImage() const
Converts image to RAW format that has been originally used.
Definition Image.h:275
RawImage AsRawBGRA() const
Converts image to raw BGRA format.
Definition Image.h:332
Intersection RectangleIntersection(const Rectangle &rectangle) const
Check intersection between rectangle and image.
Definition Image.h:144
static std::shared_ptr< Image > Decode(const std::vector< uint8_t > &imageData, unsigned int dpi, std::shared_ptr< ImageExecutor > executor)
Creates Image from image data with given DPI.
Definition Image.h:100
Intersection PointIntersection(const Point &point) const
Checks intersection between point and image.
Definition Image.h:181
RawImage AsRawBGR() const
Converts image to raw BGR format.
Definition Image.h:306
static std::shared_ptr< Image > Decode(const std::vector< uint8_t > &imageData, unsigned int dpi)
Creates Image from image data with given dpi.
Definition Image.h:65
std::shared_ptr< Image > DrawShape(const ImageShape &shape) const
Draws shape to new image.
Definition Image.h:435
std::shared_ptr< Image > CropAlignedRectangle(const Rectangle &r, const RGBA &background) const
Crop rectangle and align given top left rectangle point to coordinates [0,0] in new image.
Definition Image.h:940
std::shared_ptr< Image > AsBGR() const
Converts image to BGR format.
Definition Image.h:321
std::shared_ptr< Image > CropAlignedRectangle(const Rectangle &r) const
Crop rectangle and align given top left rectangle point to coordinates [0,0] in new image.
Definition Image.h:923
std::shared_ptr< Image > ResizeToMaxDimension(ImageDimension maxDimension) const
Resize image to new image with given max dimension.
Definition Image.h:891
std::shared_ptr< Image > CropRectangle(const Rectangle &r, const RGBA &background) const
Crops a rectangle from the image, using a white background for any extra space.
Definition Image.h:476
std::vector< uint8_t > EncodeIn(ImageEncoder &encoder) const
Encode image in given ImageEncoder.
Definition Image.h:360
void SaveAs(const std::string &path) const
Save Image in given path.
Definition Image.h:385
ImageWidth Width() const
Returns image width.
Definition Image.h:247
Null argument is not allowed.
Definition EnrollmentException.h:156
It holds X and Y coordinates of point.
Definition ImageAttribute.h:312
X x
X Coordinate.
Definition ImageAttribute.h:326
Y y
Y Coordinate.
Definition ImageAttribute.h:328
It holds RGB color with transparency.
Definition ImageAttribute.h:908
RGB color
color definition in RGB model
Definition ImageAttribute.h:911
unsigned char transparency
Transparency where 0 is fully transparent and 255 is fully opaque.
Definition ImageAttribute.h:913
unsigned char red
Red value of RGB color model. The value is in range <0,255>.
Definition ImageAttribute.h:865
unsigned char green
Green value of RGB color model. The value is in range <0,255>.
Definition ImageAttribute.h:867
unsigned char blue
Blue value of RGB color model. The value is in range <0,255>.
Definition ImageAttribute.h:869
Contains plain image data.
Definition ImageAttribute.h:135
const ImageHeight height
Image height in pixels.
Definition ImageAttribute.h:174
const ImageDpi dpi
Image DPI.
Definition ImageAttribute.h:170
const ImageWidth width
Image width in pixels.
Definition ImageAttribute.h:172
Type
RawImage encoding type.
Definition ImageAttribute.h:139
@ GRAYSCALE
Raw data where image pixels are stored in grayscale format.
Definition ImageAttribute.h:146
@ BGR
Raw data where image pixels are stored in BGR format.
Definition ImageAttribute.h:153
@ BGRA
Raw data where image pixels are stored in BGR with alpha format.
Definition ImageAttribute.h:166
const std::vector< uint8_t > & Data() const
Definition ImageAttribute.h:185
const Type type
RawImage type.
Definition ImageAttribute.h:176
It holds rectangle vertexes, width, height.
Definition ImageAttribute.h:357
const Point & GetBottomLeft() const
Provides bottom-left vertex.
Definition ImageAttribute.h:401
const Point & GetTopLeft() const
Provides top-left vertex.
Definition ImageAttribute.h:377
const Point & GetBottomRight() const
Provides bottom-right vertex.
Definition ImageAttribute.h:393
Width GetWidth() const
Provides width of rectangle The width is distance between top-left and top-right vertexes.
Definition ImageAttribute.h:412
const Point & GetTopRight() const
Provides top-right vertex.
Definition ImageAttribute.h:385
Height GetHeight() const
Provides height of rectangle The height is distance between bottom-left and top-left vertexes.
Definition ImageAttribute.h:423
ImageDimension ImageHeight
Image Height.
Definition ImageAttribute.h:36
ImageBlurType
Defines the type of border blurring applied to an image.
Definition ImageMask.h:39
unsigned int ImageDimension
Image dimension.
Definition ImageAttribute.h:31
ImageDimension ImageWidth
Image Width.
Definition ImageAttribute.h:41
ImageMaskType
Defines the polygon mask application area in image processing.
Definition ImageMask.h:23
@ INSIDE
Mask is applied to the region inside the shape, preserving the area outside.
Definition ImageMask.h:31
@ OUTSIDE
Mask is applied to the region outside the shape, preserving the area inside.
Definition ImageMask.h:27