~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Source/LibTIFF/tif_jpeg.c

  • Committer: Stefano Rivera
  • Date: 2010-07-24 15:35:51 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: stefanor@ubuntu.com-20100724153551-6s3fth1653huk31a
Tags: upstream-3.13.1
ImportĀ upstreamĀ versionĀ 3.31.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tif_jpeg.c,v 1.20 2007/11/10 18:41:15 drolon Exp $ */
 
1
/* $Id: tif_jpeg.c,v 1.28 2009/11/07 19:18:27 drolon Exp $ */
2
2
 
3
3
/*
4
4
 * Copyright (c) 1994-1997 Sam Leffler
226
226
        char buffer[JMSG_LENGTH_MAX];
227
227
 
228
228
        (*cinfo->err->format_message) (cinfo, buffer);
229
 
        TIFFErrorExt(sp->tif->tif_clientdata, "JPEGLib", buffer);               /* display the error message */
 
229
        TIFFErrorExt(sp->tif->tif_clientdata, "JPEGLib", "%s", buffer);         /* display the error message */
230
230
        jpeg_abort(cinfo);                      /* clean up libjpeg state */
231
231
        LONGJMP(sp->exit_jmpbuf, 1);            /* return to libtiff caller */
232
232
}
242
242
        char buffer[JMSG_LENGTH_MAX];
243
243
 
244
244
        (*cinfo->err->format_message) (cinfo, buffer);
245
 
        TIFFWarningExt(((JPEGState *) cinfo)->tif->tif_clientdata, "JPEGLib", buffer);
 
245
        TIFFWarningExt(((JPEGState *) cinfo)->tif->tif_clientdata, "JPEGLib", "%s", buffer);
246
246
}
247
247
 
248
248
/*
1425
1425
        if (cc % sp->bytesperline)
1426
1426
                TIFFWarningExt(tif->tif_clientdata, tif->tif_name, "fractional scanline discarded");
1427
1427
 
 
1428
        /* The last strip will be limited to image size */
 
1429
        if( !isTiled(tif) && tif->tif_row+nrows > tif->tif_dir.td_imagelength )
 
1430
            nrows = tif->tif_dir.td_imagelength - tif->tif_row;
 
1431
 
1428
1432
        while (nrows-- > 0) {
1429
1433
                bufptr[0] = (JSAMPROW) buf;
1430
1434
                if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1)