mirror of
https://github.com/aaronsgiles/JPEGView.git
synced 2024-06-06 21:29:27 +00:00
92bdb55672
These are the sources for the final official release of JPEGView for the Mac, back in 1994.
1 line
934 B
C
1 line
934 B
C
/*********************************************************/
|
|
/* This source code copyright (c) 1991-2001, Aaron Giles */
|
|
/* See the Read Me file for licensing information. */
|
|
/* Contact email: mac@aarongiles.com */
|
|
/*********************************************************/
|
|
|
|
// void CopyTo32(ulong *srcRow, void *dstRow, uchar *iTable, ColorSpec *cTable,
|
|
// DitherErrorsPtr eBuffer, DitherErrorsPtr oBuffer,
|
|
// short *rgnBuffer, uchar *errorMap, short columns)
|
|
|
|
#if applec
|
|
#pragma unused(iTable, cTable, eBuffer, oBuffer, errorMap)
|
|
#endif
|
|
|
|
ulong *src = srcRow;
|
|
ulong *dst = (ulong *)dstRow;
|
|
long rgnCol;
|
|
|
|
if (!(rgnCol = *rgnBuffer++)) rgnCol -= *rgnBuffer++;
|
|
while (columns--) {
|
|
if (rgnCol > 0) {
|
|
dst++, src++;
|
|
if (!--rgnCol) rgnCol = rgnBuffer[-1] - rgnBuffer[0], rgnBuffer++;
|
|
} else {
|
|
*dst++ = *src++;
|
|
if (!++rgnCol) rgnCol = rgnBuffer[0] - rgnBuffer[-1], rgnBuffer++;
|
|
}
|
|
}
|