MP5
Photomosaic
 All Classes Namespaces Files Functions Variables Pages
TileImage Class Reference

Represents a Tile in the Photomosaic. More...

#include <tileimage.h>

Public Member Functions

 TileImage (const PNG &theImage)
 
LUVAPixel getAverageColor () const
 
int getResolution () const
 
void paste (PNG &canvas, int startX, int startY, int resolution)
 

Private Member Functions

void generateResizedImage (int startX, int startY, int resolution)
 
LUVAPixel calculateAverageColor () const
 
LUVAPixel calculateAverageColor (unsigned x0, unsigned y0, unsigned x1, unsigned y1) const
 
LUVAPixel getScaledPixelDouble (double startX, double endX, double startY, double endY) const
 
LUVAPixel getScaledPixelInt (int startX, int endX, int startY, int endY) const
 

Static Private Member Functions

static PNG cropSourceImage (const PNG &source)
 
static uint64_t divide (uint64_t a, uint64_t b)
 
static int divide (int a, int b)
 
static int fdivide (double a, double b)
 
static double frac (double x)
 

Private Attributes

PNG image_
 
PNG resized_
 
LUVAPixel averageColor_
 

Detailed Description

Represents a Tile in the Photomosaic.


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