libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
crn::ImageBase Class Referenceabstract

Base class for images. More...

#include <CRNImage.h>

+ Inheritance diagram for crn::ImageBase:

Public Member Functions

virtual ~ImageBase ()
 
 ImageBase (size_t w, size_t h)
 
 ImageBase (const ImageBase &)=default
 
 ImageBase (ImageBase &&)=default
 
ImageBaseoperator= (const ImageBase &)=default
 
ImageBaseoperator= (ImageBase &&)=default
 
virtual std::unique_ptr
< ImageBase
Clone () const =0
 
virtual void SavePNG (const Path &fname) const =0
 Saves as PNG file. More...
 
virtual void SaveJPEG (const Path &fname, unsigned int qual) const =0
 Saves as JPEG file. More...
 
size_t GetWidth () const noexcept
 
size_t GetHeight () const noexcept
 
Rect GetBBox () const noexcept
 
size_t Size () const noexcept
 
virtual void ScaleToSize (size_t w, size_t h)=0
 Scales the image. More...
 

Protected Attributes

size_t width
 
size_t height
 

Detailed Description

Base class for images.

Definition at line 46 of file CRNImage.h.

Constructor & Destructor Documentation

ImageBase::~ImageBase ( )
virtualdefault
crn::ImageBase::ImageBase ( size_t  w,
size_t  h 
)
inline

Definition at line 54 of file CRNImage.h.

crn::ImageBase::ImageBase ( const ImageBase )
default
crn::ImageBase::ImageBase ( ImageBase &&  )
default

Member Function Documentation

virtual std::unique_ptr<ImageBase> crn::ImageBase::Clone ( ) const
pure virtual
Rect ImageBase::GetBBox ( ) const
noexcept
Returns
the bounding box of the image

Definition at line 56 of file CRNImage.cpp.

size_t crn::ImageBase::GetHeight ( ) const
inlinenoexcept
Returns
the height of the image

Definition at line 74 of file CRNImage.h.

size_t crn::ImageBase::GetWidth ( ) const
inlinenoexcept
Returns
the width of the image

Definition at line 72 of file CRNImage.h.

ImageBase& crn::ImageBase::operator= ( const ImageBase )
default
ImageBase& crn::ImageBase::operator= ( ImageBase &&  )
default
virtual void crn::ImageBase::SaveJPEG ( const Path fname,
unsigned int  qual 
) const
pure virtual
virtual void crn::ImageBase::SavePNG ( const Path fname) const
pure virtual
virtual void crn::ImageBase::ScaleToSize ( size_t  w,
size_t  h 
)
pure virtual
size_t crn::ImageBase::Size ( ) const
inlinenoexcept
Returns
the number of pixels in the image

Definition at line 78 of file CRNImage.h.

Member Data Documentation

size_t crn::ImageBase::height
protected

Definition at line 92 of file CRNImage.h.

size_t crn::ImageBase::width
protected

Definition at line 92 of file CRNImage.h.


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