From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Mikhail Kruk" <meshko@gmail.com>
References: <5a28e8c20603200939h1ee3ab84uff5a5cbc3a4e1bc0@mail.gmail.com> <5a28e8c20603201004r667ac48n78dba3128e758bf3@mail.gmail.com> <20060320190002.GA15279@ak4719.spb.edu> <5a28e8c20603201232i47051a5an5d8d2d66a22a57a9@mail.gmail.com> <000a01c64fe3$1b6d5b80$7ea4f551@dfgrrxsknr4e> <5a28e8c20603251852n616da34ah12ab5e7d82c24fa3@mail.gmail.com>
Subject: Re: [Tiff] 3.8.1 and JPEG problem
Date: Sun, 26 Mar 2006 05:25:53 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506

Mikhail,

I propose that in the future we keep conversations about stuff that is
of public interest, in the mailing list, if that is OK.

Mikhail Kruk wrote:
> I tried CVS diff with the snapshot I got on 20th and see no
> difference.  Did you check them in recently?

I haven't got a clue what may be happening... This is one of the reasons
why we need to keep stuff public, I don't know much about the CVS system
and other people may be able to comment...

I've checked in bugfixes during 25th, reading part very early, and
writing part later that same day, right before I posted my test request
in the mailing list.

The files that are updated include tif_jpeg.c, but also tif_strip,
tifio.h, tif_getimage.c, and some others (there were several bugs
working together to make life difficult).

> The snapshot I have doesn't read or write JPEG TIFFs (output is all
> black)... I'm testing using tiffcp, is it possible that the problem is
> with it, not the lib?  Reading JPG works fine with my own program I
> build against 3.8.0.  Do you want me to try linking my app with the
> CVS snapshot?

If you see no diff, then that's pretty useless. We need to find out why
you're not seeing what I comitted, first.

> I also tried tiffcp from 3.8.0 and it doesn't work.
> I guess the next logical step is to assume that tiffcp is broken and
> test with my app, but I want to make sure that I'm looking at the
> right CVS since you sound like you've made some changes and I don't
> see them.

I've not tested tiffcp, but the results you were getting make perfect
sense with the bugs I've corrected in several other files, so I would
assume there's nothing wrong with tiffcp as such. It may *seem* that way
though... There are several ways to access JPEG compression in TIFF, and
only the recommendable way, without use of the pseudotag JPEGCOLORMODE,
was broken (as far as I know). So, one app may have been suffering,
while another may have been behaving perfectly OK.

When I update CVS, I see what I have comitted. Frank was waiting for the
bugfixes, so I assume he too, will soon update CVS and check out my
fixes. Since I know very little about CVS systems beyond there basic
use, all I can suggest at this stage is
- wait a couple of hours maybe, and check again?
- wait for Frank to report back?
- check the changelog file in the root level. The top few entries should
read the following:

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

 * libtiff/tif_jpeg.c: strip size related bugfix in encode raw

 * libtiff/tif_strip.c: temporarilly added two new versions of
   - TIFFNewScanlineSize: proposed new version, after all related
     issues and side-effects are sorted out
   - TIFFOldScanlineSize: old version, from prior to 2006-03-21 change
 This needs further sorting out.

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

 * contrib/addtiffo/tif_ovrcache.c: bugfix to correctly pass size
 of last truncated strip data to TIFFWriteEncodedStrip

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

 * libtiff/{tif_jpeg.c, tif_strip.c}: bugfix of tif_jpeg decode raw

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

 * libtiff/tif_getimage.c: bugfix/rewrite of putcontig8bitYCbCr22tile

 * libtiff/tif_getimage.c: added putcontig8bitYCbCr12tile

 * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to
 prepare the path for new tif_ojpeg.c



Best regards,

Joris
