From f23487170c4202dd828faa3eecb2170beb4eb32f Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Thu, 20 May 2004 19:20:52 +0000 Subject: [PATCH] Fixed problem with unproperly written multibyte files. Now output files will be written using the same byte order flag as in the input image. See http://bugzilla.remotesensing.org/show_bug.cgi?id=574 for details. --- tools/tiffsplit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tiffsplit.c b/tools/tiffsplit.c index c9734fa3..3ca60be2 100644 --- a/tools/tiffsplit.c +++ b/tools/tiffsplit.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/tools/tiffsplit.c,v 1.5 2004-02-26 10:14:19 dron Exp $ */ +/* $Id: tiffsplit.c,v 1.6 2004-05-20 19:20:52 dron Exp $ */ /* * Copyright (c) 1992-1997 Sam Leffler @@ -63,7 +63,7 @@ main(int argc, char* argv[]) newfilename(); strcpy(path, fname); strcat(path, ".tif"); - out = TIFFOpen(path, "w"); + out = TIFFOpen(path, TIFFIsBigEndian(in)?"wb":"wl"); if (out == NULL) return (-2); if (!tiffcp(in, out))