00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_IMAGE_RGBA_FLOAT_H
00030 #define _GAN_IMAGE_RGBA_FLOAT_H
00031
00032 #define GAN_PIXEL struct Gan_RGBAPixel_f
00033 #define GAN_PIXEL_FORMAT RGB-colour alpha
00034 #define GAN_PIXEL_TYPE float
00035 #define GAN_IMTYPE f
00036 #define GAN_IMAGE_FORM_GEN gan_image_form_gen_rgba_f
00037 #define GAN_IMAGE_SET_GEN gan_image_set_gen_rgba_f
00038 #define GAN_IMAGE_ALLOC gan_image_alloc_rgba_f
00039 #define GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_rgba_f
00040 #define GAN_IMAGE_FORM gan_image_form_rgba_f
00041 #define GAN_IMAGE_FORM_DATA gan_image_form_data_rgba_f
00042 #define GAN_IMAGE_SET gan_image_set_rgba_f
00043 #define GAN_IMAGE_SET_PIX gan_image_set_pix_rgba_f
00044 #define GAN_IMAGE_GET_PIX gan_image_get_pix_rgba_f
00045 #define GAN_IMAGE_GET_PIXPTR gan_image_get_pixptr_rgba_f
00046 #define GAN_IMAGE_GET_PIXARR gan_image_get_pixarr_rgba_f
00047 #define GAN_IMAGE_FILL_CONST gan_image_fill_const_rgba_f
00048 #define GAN_IMAGE_GET_ACTIVE_SUBWINDOW gan_image_get_active_subwindow_rgba_f
00049 #define GAN_IMAGE_MASK_WINDOW gan_image_mask_window_rgba_f
00050 #define GAN_IMAGE_CLEAR_WINDOW gan_image_clear_window_rgba_f
00051
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 #include <stdlib.h>
00081 #include <gandalf/common/misc_defs.h>
00082 #include <gandalf/image/image_defs.h>
00083
00089 #ifdef __cplusplus
00090 extern "C" {
00091 #endif
00092
00093
00102 struct Gan_Image *gan_image_set_gen_rgba_f ( Gan_Image *img,
00103 unsigned long height,
00104 unsigned long width,
00105 unsigned long stride,
00106 Gan_Bool alloc_pix_data );
00107
00120 struct Gan_Image *gan_image_form_gen_rgba_f ( Gan_Image *img,
00121 unsigned long height,
00122 unsigned long width,
00123 unsigned long stride,
00124 Gan_Bool alloc_pix_data,
00125 struct Gan_RGBAPixel_f *pix_data,
00126 size_t pix_data_size,
00127 struct Gan_RGBAPixel_f **row_data,
00128 size_t row_data_size );
00129
00148 Gan_Bool gan_image_get_active_subwindow_rgba_f ( const Gan_Image *image,
00149 Gan_ImageWindow *subwin );
00154 #ifndef NDEBUG
00155
00166 struct Gan_RGBAPixel_f *gan_image_get_pixptr_rgba_f ( const Gan_Image *img,
00167 unsigned row, unsigned col );
00168
00175 struct Gan_RGBAPixel_f **gan_image_get_pixarr_rgba_f ( const Gan_Image *img );
00176
00180 #endif
00181
00191 Gan_Bool gan_image_mask_window_rgba_f ( Gan_Image *pImage,
00192 unsigned r0, unsigned c0,
00193 unsigned height, unsigned width );
00194
00199 Gan_Bool gan_image_clear_window_rgba_f ( Gan_Image *pImage,
00200 unsigned r0, unsigned c0,
00201 unsigned height, unsigned width );
00206 #if defined(GAN_IMAGE_GET_MINIMUM_PIXEL)
00207
00211 Gan_Bool GAN_IMAGE_GET_MINIMUM_PIXEL ( const Gan_Image *pImage,
00212 const Gan_Image *pMask,
00213 float *minval );
00214 Gan_Bool GAN_IMAGE_GET_MAXIMUM_PIXEL ( const Gan_Image *pImage,
00215 const Gan_Image *pMask,
00216 float *maxval );
00220 #endif
00221
00222
00223
00224
00240 Gan_Image *gan_image_alloc_rgba_f ( unsigned long height, unsigned long width );
00241
00254 Gan_Image *gan_image_form_rgba_f ( Gan_Image *img,
00255 unsigned long height, unsigned long width );
00256
00273 Gan_Image *gan_image_alloc_data_rgba_f ( unsigned long height,
00274 unsigned long width,
00275 unsigned long stride,
00276 struct Gan_RGBAPixel_f *pix_data, size_t pix_data_size,
00277 struct Gan_RGBAPixel_f **row_data, size_t row_data_size );
00278
00296 Gan_Image *gan_image_form_data_rgba_f ( Gan_Image *img,
00297 unsigned long height,
00298 unsigned long width,
00299 unsigned long stride,
00300 struct Gan_RGBAPixel_f *pix_data, size_t pix_data_size,
00301 struct Gan_RGBAPixel_f **row_data, size_t row_data_size );
00302
00322 Gan_Image *gan_image_set_rgba_f ( Gan_Image *img,
00323 unsigned long height, unsigned long width );
00324
00341 Gan_Bool gan_image_set_pix_rgba_f ( Gan_Image *img, unsigned row, unsigned col,
00342 struct Gan_RGBAPixel_f *pix );
00343
00350 struct Gan_RGBAPixel_f gan_image_get_pix_rgba_f ( const Gan_Image *img, unsigned row, unsigned col );
00351
00368 Gan_Bool gan_image_fill_const_rgba_f ( Gan_Image *img, struct Gan_RGBAPixel_f *pix );
00369
00375 #ifdef __cplusplus
00376 }
00377 #endif
00378
00379 #undef GAN_PIXEL
00380 #undef GAN_PIXEL_FORMAT
00381 #undef GAN_PIXEL_TYPE
00382 #undef GAN_IMTYPE
00383 #undef GAN_IMAGE_FORM_GEN
00384 #undef GAN_IMAGE_SET_GEN
00385 #undef GAN_IMAGE_ALLOC
00386 #undef GAN_IMAGE_ALLOC_DATA
00387 #undef GAN_IMAGE_FORM
00388 #undef GAN_IMAGE_FORM_DATA
00389 #undef GAN_IMAGE_SET
00390 #undef GAN_IMAGE_SET_PIX
00391 #undef GAN_IMAGE_GET_PIX
00392 #undef GAN_IMAGE_GET_PIXPTR
00393 #undef GAN_IMAGE_GET_PIXARR
00394 #undef GAN_IMAGE_FILL_CONST
00395 #undef GAN_IMAGE_GET_ACTIVE_SUBWINDOW
00396 #undef GAN_IMAGE_MASK_WINDOW
00397 #undef GAN_IMAGE_CLEAR_WINDOW
00398 #undef GAN_IMAGE_GET_MINIMUM_PIXEL
00399 #undef GAN_IMAGE_GET_MAXIMUM_PIXEL
00400 #undef GAN_IMAGE_PIXEL_MIN_VAL
00401 #undef GAN_IMAGE_PIXEL_MAX_VAL
00402 #undef GAN_IMAGE_PIXEL_ZERO_VAL
00403
00409 #endif