Fixes in orientation support.

This commit is contained in:
Andrey Kiselev 2002-08-18 17:29:17 +00:00
parent 202b3ade1d
commit ff411c24b5

View File

@ -1,4 +1,4 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/tools/tiffcp.c,v 1.7 2002-03-31 22:57:19 dron Exp $ */ /* $Header: /cvs/maptools/cvsroot/libtiff/tools/tiffcp.c,v 1.8 2002-08-18 17:29:17 dron Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
@ -480,7 +480,6 @@ static struct cpTag {
{ TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII }, { TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII },
{ TIFFTAG_MAKE, 1, TIFF_ASCII }, { TIFFTAG_MAKE, 1, TIFF_ASCII },
{ TIFFTAG_MODEL, 1, TIFF_ASCII }, { TIFFTAG_MODEL, 1, TIFF_ASCII },
//FIXME { TIFFTAG_ORIENTATION, 1, TIFF_SHORT },
{ TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT }, { TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT },
{ TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT }, { TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT },
{ TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL }, { TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL },
@ -909,12 +908,8 @@ static void
cpStripToTile(uint8* out, uint8* in, cpStripToTile(uint8* out, uint8* in,
uint32 rows, uint32 cols, int outskew, int inskew) uint32 rows, uint32 cols, int outskew, int inskew)
{ {
uint8 *base = out;
while (rows-- > 0) { while (rows-- > 0) {
uint32 j = cols; uint32 j = cols;
if (orientation == ORIENTATION_BOTLEFT)
/* Mirror rows vertically */
out = base + (cols + outskew) * rows;
while (j-- > 0) while (j-- > 0)
*out++ = *in++; *out++ = *in++;
out += outskew; out += outskew;