diff options
author | Joris Van Damme <joris.at.lebbeke@skynet.be> | 2005-12-21 12:23:13 +0000 |
---|---|---|
committer | Joris Van Damme <joris.at.lebbeke@skynet.be> | 2005-12-21 12:23:13 +0000 |
commit | 5cbfc68f0625d6c29d724b6e57fa7e98017ad325 (patch) | |
tree | 78796f9d7b231ba6b69e2675e2b342f81e21dc50 /libtiff/tif_write.c | |
parent | 839c207d313ccf068c98aa4d466e81fdf1aef27b (diff) | |
download | libtiff-git-5cbfc68f0625d6c29d724b6e57fa7e98017ad325.tar.gz |
*** empty log message ***
Diffstat (limited to 'libtiff/tif_write.c')
-rw-r--r-- | libtiff/tif_write.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libtiff/tif_write.c b/libtiff/tif_write.c index 5034c648..de4511d0 100644 --- a/libtiff/tif_write.c +++ b/libtiff/tif_write.c @@ -1,4 +1,4 @@ -/* $Id: tif_write.c,v 1.19 2005-10-15 15:57:54 fwarmerdam Exp $ */ +/* $Id: tif_write.c,v 1.20 2005-12-21 12:23:13 joris Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -69,7 +69,7 @@ TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample) */ if (row >= td->td_imagelength) { /* extend image */ if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - TIFFError(tif->tif_name, + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Can not change \"ImageLength\" when using separate planes"); return (-1); } @@ -81,7 +81,7 @@ TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample) */ if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { if (sample >= td->td_samplesperpixel) { - TIFFError(tif->tif_name, + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%d: Sample out of range, max %d", sample, td->td_samplesperpixel); return (-1); @@ -200,7 +200,7 @@ TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc) */ if (strip >= td->td_nstrips) { if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - TIFFError(tif->tif_name, + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Can not grow image by strips when using separate planes"); return ((tsize_t) -1); } @@ -283,7 +283,7 @@ TIFFWriteRawStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc) */ if (strip >= td->td_nstrips) { if (td->td_planarconfig == PLANARCONFIG_SEPARATE) { - TIFFError(tif->tif_name, + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Can not grow image by strips when using separate planes"); return ((tsize_t) -1); } @@ -347,7 +347,7 @@ TIFFWriteEncodedTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc) return ((tsize_t) -1); td = &tif->tif_dir; if (tile >= td->td_nstrips) { - TIFFError(module, "%s: Tile %lu out of range, max %lu", + TIFFErrorExt(tif->tif_clientdata, module, "%s: Tile %lu out of range, max %lu", tif->tif_name, (unsigned long) tile, (unsigned long) td->td_nstrips); return ((tsize_t) -1); } @@ -433,7 +433,7 @@ TIFFWriteRawTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc) if (!WRITECHECKTILES(tif, module)) return ((tsize_t) -1); if (tile >= tif->tif_dir.td_nstrips) { - TIFFError(module, "%s: Tile %lu out of range, max %lu", + TIFFErrorExt(tif->tif_clientdata, module, "%s: Tile %lu out of range, max %lu", tif->tif_name, (unsigned long) tile, (unsigned long) tif->tif_dir.td_nstrips); return ((tsize_t) -1); @@ -489,12 +489,12 @@ int TIFFWriteCheck(TIFF* tif, int tiles, const char* module) { if (tif->tif_mode == O_RDONLY) { - TIFFError(module, "%s: File not open for writing", + TIFFErrorExt(tif->tif_clientdata, module, "%s: File not open for writing", tif->tif_name); return (0); } if (tiles ^ isTiled(tif)) { - TIFFError(tif->tif_name, tiles ? + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, tiles ? "Can not write tiles to a stripped image" : "Can not write scanlines to a tiled image"); return (0); @@ -511,7 +511,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module) * the image's length to be changed). */ if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) { - TIFFError(module, + TIFFErrorExt(tif->tif_clientdata, module, "%s: Must set \"ImageWidth\" before writing data", tif->tif_name); return (0); @@ -526,7 +526,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module) tif->tif_dir.td_planarconfig = PLANARCONFIG_CONTIG; } else { if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) { - TIFFError(module, + TIFFErrorExt(tif->tif_clientdata, module, "%s: Must set \"PlanarConfiguration\" before writing data", tif->tif_name); return (0); @@ -534,7 +534,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module) } if (tif->tif_dir.td_stripoffset == NULL && !TIFFSetupStrips(tif)) { tif->tif_dir.td_nstrips = 0; - TIFFError(module, "%s: No space for %s arrays", + TIFFErrorExt(tif->tif_clientdata, module, "%s: No space for %s arrays", tif->tif_name, isTiled(tif) ? "tile" : "strip"); return (0); } @@ -572,7 +572,7 @@ TIFFWriteBufferSetup(TIFF* tif, tdata_t bp, tsize_t size) if (bp == NULL) { bp = _TIFFmalloc(size); if (bp == NULL) { - TIFFError(module, "%s: No space for output buffer", + TIFFErrorExt(tif->tif_clientdata, module, "%s: No space for output buffer", tif->tif_name); return (0); } @@ -607,7 +607,7 @@ TIFFGrowStrips(TIFF* tif, int delta, const char* module) if (new_stripbytecount) _TIFFfree(new_stripbytecount); td->td_nstrips = 0; - TIFFError(module, "%s: No space to expand strip arrays", + TIFFErrorExt(tif->tif_clientdata, module, "%s: No space to expand strip arrays", tif->tif_name); return (0); } @@ -667,7 +667,7 @@ TIFFAppendToStrip(TIFF* tif, tstrip_t strip, tidata_t data, tsize_t cc) } if (!SeekOK(tif, td->td_stripoffset[strip])) { - TIFFError(module, + TIFFErrorExt(tif->tif_clientdata, module, "%s: Seek error at scanline %lu", tif->tif_name, (unsigned long)tif->tif_row); @@ -680,7 +680,7 @@ TIFFAppendToStrip(TIFF* tif, tstrip_t strip, tidata_t data, tsize_t cc) } if (!WriteOK(tif, data, cc)) { - TIFFError(module, "%s: Write error at scanline %lu", + TIFFErrorExt(tif->tif_clientdata, module, "%s: Write error at scanline %lu", tif->tif_name, (unsigned long) tif->tif_row); return (0); } |