/*
* tkImgUtil.c --
*
* This file contains image related utility functions.
*
* Copyright (c) 1995 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) tkImgUtil.c 1.3 96/02/15 18:53:12
*/
#include "tkInt.h"
#include "xbytes.h"
/*
*----------------------------------------------------------------------
*
* TkAlignImageData --
*
* This function takes an image and copies the data into an
* aligned buffer, performing any necessary bit swapping.
*
* Results:
* Returns a newly allocated buffer that should be freed by the
* caller.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
char *
int alignment; /* Number of bytes to which the data should
* be aligned (e.g. 2 or 4) */
int bitOrder; /* Desired bit order: LSBFirst or MSBFirst. */
{
long dataWidth;
int i, j;
panic("TkAlignImageData: Can't handle image depths greater than 1.");
}
/*
* Compute line width for output data buffer.
*/
}
for (j = 0; j < dataWidth; j++) {
if (j >= image->bytes_per_line) {
*destPtr = 0;
} else {
}
destPtr++;
}
}
return data;
}