00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_IMAGE_RGB_UINT32_H
00030 #define _GAN_IMAGE_RGB_UINT32_H
00031
00032 #include <gandalf/common/misc_defs.h>
00033
00034
00035
00036 #define GAN_PIXEL Gan_RGBPixel_ui32
00037 #define GAN_PIXEL_FORMAT RGB colour
00038 #define GAN_PIXEL_TYPE 32-bit unsigned integer
00039
00040 #define GAN_IMAGE_FORM_GEN gan_image_form_gen_rgb_ui32
00041 #define GAN_IMAGE_SET_GEN gan_image_set_gen_rgb_ui32
00042 #define GAN_IMAGE_ALLOC gan_image_alloc_rgb_ui32
00043 #define GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_rgb_ui32
00044 #define GAN_IMAGE_FORM gan_image_form_rgb_ui32
00045 #define GAN_IMAGE_FORM_DATA gan_image_form_data_rgb_ui32
00046 #define GAN_IMAGE_SET gan_image_set_rgb_ui32
00047 #define GAN_IMAGE_SET_PIX gan_image_set_pix_rgb_ui32
00048 #define GAN_IMAGE_GET_PIX gan_image_get_pix_rgb_ui32
00049 #define GAN_IMAGE_GET_PIXPTR gan_image_get_pixptr_rgb_ui32
00050 #define GAN_IMAGE_GET_PIXARR gan_image_get_pixarr_rgb_ui32
00051 #define GAN_IMAGE_FILL_CONST gan_image_fill_const_rgb_ui32
00052 #define GAN_IMAGE_GET_ACTIVE_SUBWINDOW gan_image_get_active_subwindow_rgb_ui32
00053 #define GAN_IMAGE_MASK_WINDOW gan_image_mask_window_rgb_ui32
00054 #define GAN_IMAGE_CLEAR_WINDOW gan_image_clear_window_rgb_ui32
00055
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 #include <stdlib.h>
00085 #include <gandalf/common/misc_defs.h>
00086 #include <gandalf/image/image_defs.h>
00087
00093 #ifdef __cplusplus
00094 extern "C" {
00095 #endif
00096
00097
00106 struct Gan_Image *gan_image_set_gen_rgb_ui32 ( Gan_Image *img,
00107 unsigned long height,
00108 unsigned long width,
00109 unsigned long stride,
00110 Gan_Bool alloc_pix_data );
00111
00124 struct Gan_Image *gan_image_form_gen_rgb_ui32 ( Gan_Image *img,
00125 unsigned long height,
00126 unsigned long width,
00127 unsigned long stride,
00128 Gan_Bool alloc_pix_data,
00129 Gan_RGBPixel_ui32 *pix_data,
00130 size_t pix_data_size,
00131 Gan_RGBPixel_ui32 **row_data,
00132 size_t row_data_size );
00133
00152 Gan_Bool gan_image_get_active_subwindow_rgb_ui32 ( const Gan_Image *image,
00153 Gan_ImageWindow *subwin );
00158 #ifndef NDEBUG
00159
00170 Gan_RGBPixel_ui32 *gan_image_get_pixptr_rgb_ui32 ( const Gan_Image *img,
00171 unsigned row, unsigned col );
00172
00179 Gan_RGBPixel_ui32 **gan_image_get_pixarr_rgb_ui32 ( const Gan_Image *img );
00180
00184 #endif
00185
00195 Gan_Bool gan_image_mask_window_rgb_ui32 ( Gan_Image *pImage,
00196 unsigned r0, unsigned c0,
00197 unsigned height, unsigned width );
00198
00203 Gan_Bool gan_image_clear_window_rgb_ui32 ( Gan_Image *pImage,
00204 unsigned r0, unsigned c0,
00205 unsigned height, unsigned width );
00210 #if defined(GAN_IMAGE_GET_MINIMUM_PIXEL)
00211
00215 Gan_Bool GAN_IMAGE_GET_MINIMUM_PIXEL ( const Gan_Image *pImage,
00216 const Gan_Image *pMask,
00217 32-bit unsigned *minval );
00218 Gan_Bool GAN_IMAGE_GET_MAXIMUM_PIXEL ( const Gan_Image *pImage,
00219 const Gan_Image *pMask,
00220 32-bit unsigned *maxval );
00224 #endif
00225
00226
00227
00228
00244 Gan_Image *gan_image_alloc_rgb_ui32 ( unsigned long height, unsigned long width );
00245
00258 Gan_Image *gan_image_form_rgb_ui32 ( Gan_Image *img,
00259 unsigned long height, unsigned long width );
00260
00277 Gan_Image *gan_image_alloc_data_rgb_ui32 ( unsigned long height,
00278 unsigned long width,
00279 unsigned long stride,
00280 Gan_RGBPixel_ui32 *pix_data, size_t pix_data_size,
00281 Gan_RGBPixel_ui32 **row_data, size_t row_data_size );
00282
00300 Gan_Image *gan_image_form_data_rgb_ui32 ( Gan_Image *img,
00301 unsigned long height,
00302 unsigned long width,
00303 unsigned long stride,
00304 Gan_RGBPixel_ui32 *pix_data, size_t pix_data_size,
00305 Gan_RGBPixel_ui32 **row_data, size_t row_data_size );
00306
00326 Gan_Image *gan_image_set_rgb_ui32 ( Gan_Image *img,
00327 unsigned long height, unsigned long width );
00328
00345 Gan_Bool gan_image_set_pix_rgb_ui32 ( Gan_Image *img, unsigned row, unsigned col,
00346 Gan_RGBPixel_ui32 *pix );
00347
00354 Gan_RGBPixel_ui32 gan_image_get_pix_rgb_ui32 ( const Gan_Image *img, unsigned row, unsigned col );
00355
00372 Gan_Bool gan_image_fill_const_rgb_ui32 ( Gan_Image *img, Gan_RGBPixel_ui32 *pix );
00373
00379 #ifdef __cplusplus
00380 }
00381 #endif
00382
00383 #undef GAN_PIXEL
00384 #undef GAN_PIXEL_FORMAT
00385 #undef GAN_PIXEL_TYPE
00386 #undef GAN_IMTYPE
00387 #undef GAN_IMAGE_FORM_GEN
00388 #undef GAN_IMAGE_SET_GEN
00389 #undef GAN_IMAGE_ALLOC
00390 #undef GAN_IMAGE_ALLOC_DATA
00391 #undef GAN_IMAGE_FORM
00392 #undef GAN_IMAGE_FORM_DATA
00393 #undef GAN_IMAGE_SET
00394 #undef GAN_IMAGE_SET_PIX
00395 #undef GAN_IMAGE_GET_PIX
00396 #undef GAN_IMAGE_GET_PIXPTR
00397 #undef GAN_IMAGE_GET_PIXARR
00398 #undef GAN_IMAGE_FILL_CONST
00399 #undef GAN_IMAGE_GET_ACTIVE_SUBWINDOW
00400 #undef GAN_IMAGE_MASK_WINDOW
00401 #undef GAN_IMAGE_CLEAR_WINDOW
00402 #undef GAN_IMAGE_GET_MINIMUM_PIXEL
00403 #undef GAN_IMAGE_GET_MAXIMUM_PIXEL
00404 #undef GAN_IMAGE_PIXEL_MIN_VAL
00405 #undef GAN_IMAGE_PIXEL_MAX_VAL
00406 #undef GAN_IMAGE_PIXEL_ZERO_VAL
00407
00414 #endif