easimage
Functions
image.c File Reference
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <SDL/SDL.h>
#include <fcntl.h>
#include <unistd.h>
#include <math.h>
#include "easimage.h"
Include dependency graph for image.c:

Functions

ImageimgNew (unsigned int width, unsigned int height, unsigned short depth)
 Creates a new image. More...
 
ImageimgFromBitmap (const char *filename)
 Loads an image from a BMP image file. More...
 
ImageimgFromPPM (const char *filename)
 Loads an image from a PPM image file. More...
 
ImageimgFromFile (const char *filename)
 
void imgScale (Image *img, unsigned int sfactor)
 Scales an image.
 
ImageimgCopy (Image *img)
 Creates a copy of an Image. More...
 
ImageimgCrop (Image *img, int x1, int y1, int x2, int y2)
 Crops an image. More...
 
int imgGetSymmetryError (Image *img, int x, int y, int radius)
 Evaluates simmetry error at location. More...
 
ImageimgPatternDifference (Image *img, Image *pat, Image *res, int x1, int y1, int x2, int y2)
 Searches image for a pattern. More...
 
int imgGetSumArea (Image *img, int x1, int y1, int x2, int y2)
 Evaluates the addition of pixel components. More...
 
float imgGetMeanArea (Image *img, int x1, int y1, int x2, int y2)
 Evaluates the pixel component mean value. More...
 
float imgGetMean (Image *img)
 Evaluates the pixel component mean value. More...
 
int imgFindPatternArea (Image *img, Image *pat, int x1, int y1, int x2, int y2, int *best_x, int *best_y)
 Searches image area for a pattern. More...
 
int imgFindPattern (Image *img, Image *pat, int *best_x, int *best_y)
 Searches image for a pattern. More...
 
void imgMakeSymmetricX (Image *img)
 
void imgMakeSymmetricY (Image *img)
 
void imgMakeSymmetric (Image *img)
 
int imgGetSymmetricError (Image *img, int x1, int x2, int y1, int y2)
 
unsigned int imgGetWidth (Image *img)
 
unsigned int imgGetHeight (Image *img)
 
void imgSetPixel (Image *img, unsigned int x, unsigned int y, unsigned char *pdata)
 
void imgSetPixelRGB (Image *img, unsigned int x, unsigned int y, unsigned char r, unsigned char g, unsigned char b)
 
void imgSetPixelRGBA (Image *img, unsigned int x, unsigned int y, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
unsigned char * imgGetPixel (Image *img, unsigned int x, unsigned int y)
 Gets pixel data. More...
 
int imgGetPixelDifference (unsigned char *p1, unsigned char *p2)
 
ImageimgConvolution (Image *img1, Image *img2, Image *res)
 Image convolution. More...
 
ImageimgCreateGaussian (int dim, float sig)
 
void imgDestroy (Image *img)
 Destroys the image.
 
int imgSaveRAW (Image *img, char *fname)
 Save RAW file. More...
 
int imgSavePPM (Image *img, char *fname)
 
int imgSavePAM (Image *img, char *fname)
 
void MarkImagePositionRGB (Image *img, int x, int y, unsigned char r, unsigned char g, unsigned char b)
 
void MarkImagePosition (Image *img, int x, int y)
 

Detailed Description

Author
Miguel Leitao