/** * im_copy_native: * @in: input image * @out: output image * @is_msb_first: %TRUE if @in is in most-significant first form * * Copy an image to native order, that is, the order for the executing * program. * * See also: im_copy_swap(), im_amiMSBfirst(). * * Returns: 0 on success, -1 on error. */ int im_copy_native( IMAGE *in, IMAGE *out, gboolean is_msb_first ) { if( is_msb_first != im_amiMSBfirst() ) return( im_copy_swap( in, out ) ); else return( im_copy( in, out ) ); }
int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture ) { switch( architecture ) { case IM_ARCH_NATIVE: return( im_copy( in, out ) ); case IM_ARCH_BYTE_SWAPPED: return( im_copy_swap( in, out ) ); case IM_ARCH_LSB_FIRST: return( im_amiMSBfirst() ? im_copy_swap( in, out ) : im_copy( in, out ) ); case IM_ARCH_MSB_FIRST: return( im_amiMSBfirst() ? im_copy( in, out ) : im_copy_swap( in, out ) ); default: im_error( "im_copy_from", _( "bad architecture: %d" ), architecture ); return( -1 ); } }
/* Call im_copy_swap via arg vector. */ static int copy_swap_vec( im_object *argv ) { return( im_copy_swap( argv[0], argv[1] ) ); }