/*
 Bmp
 Copyright (C) 2010 Martin Štrympl
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public
 License as published by the Free Software Foundation; either
 version 3.0 of the License, or (at your option) any later version.
 
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 General Public License for more details.
 
 You should have received a copy of the GNU General Public
 License along with this library.
 
 Martin Štrympl
 xstrym00@stud.feec.vutbr.cz
 */

/*
 *  bmp.h
 *  Bmp
 *
 *  Created by Martin Štrympl on 11/4/10.
 *  Copyright 2010 School. All rights reserved.
 *
 */

#ifndef BMP_H_INCLUDED
#define BMP_H_INCLUDED

#include "Headers.h"
#include "Module.h"

// white or black bmp format

struct sBMP;

struct sBMP_PixelMask
{
  uint8_t *au1_pixels;
  
  int32_t i4_x_move, i4_y_move;
  
  uint32_t u4_x_min, u4_x_max;
  uint32_t u4_y_min, u4_y_max;
  
  uint32_t u4_width, u4_height;
};

bool BMP_PixelMask_Resize(struct sBMP *ps_bmp, struct sBMP_PixelMask *ps_pixels, int32_t i4_x_min, int32_t i4_x_max, int32_t i4_y_min, int32_t i4_y_max);
bool BMP_PixelMask_Pixel(struct sBMP *ps_bmp, struct sBMP_PixelMask *ps_pixels, int32_t i4_x, int32_t i4_y, bool b_positive);

struct sBMP
{
  long double ld_x_scaler, ld_y_scaler;
  
  struct sBMP_PixelMask s_pixels;
  
  char *t_file;
  
  uint32_t i4_debuglevel;
};

#endif
