NAME

get_target_bw_byte_image - Converts a bw_byte_image to a KJB_image

SYNOPSIS

#include "i/i_bw_byte.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int get_target_bw_byte_image
(
	Bw_byte_image **target_ipp,
	int num_rows,
	int num_cols
);

DESCRIPTION

This routine implements the image creation/over-writing semantics used in the KJB library in the case of Black and White Byte images. If *target_ipp is NULL, then this routine creates the image. If it is not null, and it is the right size, then this routine does nothing. If it is the wrong size, then it is resized. In order to be memory efficient, we free before resizing. If the resizing fails, then the original contents of the *target_ipp will be lost. However, *target_ipp will be set to NULL, so it can be safely sent to free_bw_byte_image(). Note that this is in fact the convention throughout the KJB library--if destruction on failure is a problem (usually when *target_ipp is global)--then work on a copy!

RETURNS

NO_ERROR on sucess and ERROR on failure with an error message being set.

RELATED

Bw_byte_image, kjb_free_bw_byte_image

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kate Spriggs

DOCUMENTER

Kate Spriggs

SEE ALSO

bw_byte_image_to_kjb_image , rotate_bw_byte_image , kjb_copy_bw_byte_image , get_bw_byte_image_face_region , kjb_image_to_bw_byte_image