1 /* Copyright (C) 2001-2006 Artifex Software, Inc. 2 All Rights Reserved. 3 4 This software is provided AS-IS with no warranty, either express or 5 implied. 6 7 This software is distributed under license and may not be copied, modified 8 or distributed except as expressly authorized under the terms of that 9 license. Refer to licensing information at http://www.artifex.com/ 10 or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, 11 San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. 12 */ 13 14 /* $Id: gsflip.h 8022 2007-06-05 22:23:38Z giles $ */ 15 /* Interface to routines for "flipping" image data */ 16 17 #ifndef gsflip_INCLUDED 18 # define gsflip_INCLUDED 19 20 /* 21 * Convert planar (MultipleDataSource) input to chunky format. The input 22 * data starts at planes[0] + offset ... planes[num_planes-1] + offset; the 23 * output is stored at buffer. This procedure assumes that the input 24 * consists of an integral number of pixels; in particular, for 12-bit 25 * input, nbytes is rounded up to a multiple of 3. num_planes must be >=0; 26 * bits_per_sample must be 1, 2, 4, 8, or 12. Returns -1 if num_planes or 27 * bits_per_sample is invalid, otherwise 0. 28 */ 29 extern int image_flip_planes(byte * buffer, const byte ** planes, 30 int offset, int nbytes, 31 int num_planes, int bits_per_sample); 32 33 #endif /* gsflip_INCLUDED */ 34