• Home
  • Raw
  • Download

Lines Matching refs:tif

130 checkInkNamesString(TIFF* tif, uint32 slen, const char* s)  in checkInkNamesString()  argument
132 TIFFDirectory* td = &tif->tif_dir; in checkInkNamesString()
147 TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", in checkInkNamesString()
149 tif->tif_name, in checkInkNamesString()
156 _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) in _TIFFVSetField() argument
160 TIFFDirectory* td = &tif->tif_dir; in _TIFFVSetField()
165 const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); in _TIFFVSetField()
198 if (tif->tif_flags & TIFF_SWAB) { in _TIFFVSetField()
200 tif->tif_postdecode = _TIFFNoPostDecode; in _TIFFVSetField()
202 tif->tif_postdecode = _TIFFSwab16BitData; in _TIFFVSetField()
204 tif->tif_postdecode = _TIFFSwab24BitData; in _TIFFVSetField()
206 tif->tif_postdecode = _TIFFSwab32BitData; in _TIFFVSetField()
208 tif->tif_postdecode = _TIFFSwab64BitData; in _TIFFVSetField()
210 tif->tif_postdecode = _TIFFSwab64BitData; in _TIFFVSetField()
220 if (TIFFFieldSet(tif, FIELD_COMPRESSION)) { in _TIFFVSetField()
223 (*tif->tif_cleanup)(tif); in _TIFFVSetField()
224 tif->tif_flags &= ~TIFF_CODERSETUP; in _TIFFVSetField()
229 if( (status = TIFFSetCompressionScheme(tif, v)) != 0 ) in _TIFFVSetField()
264 if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) { in _TIFFVSetField()
276 if (tif->tif_flags & TIFF_PERSAMPLE) in _TIFFVSetField()
282 if (tif->tif_flags & TIFF_PERSAMPLE) in _TIFFVSetField()
345 if (tif->tif_mode != O_RDONLY) in _TIFFVSetField()
347 TIFFWarningExt(tif->tif_clientdata, tif->tif_name, in _TIFFVSetField()
351 tif->tif_flags |= TIFF_ISTILED; in _TIFFVSetField()
356 if (tif->tif_mode != O_RDONLY) in _TIFFVSetField()
358 TIFFWarningExt(tif->tif_clientdata, tif->tif_name, in _TIFFVSetField()
362 tif->tif_flags |= TIFF_ISTILED; in _TIFFVSetField()
390 && tif->tif_postdecode == _TIFFSwab32BitData ) in _TIFFVSetField()
391 tif->tif_postdecode = _TIFFSwab16BitData; in _TIFFVSetField()
395 && tif->tif_postdecode == _TIFFSwab64BitData ) in _TIFFVSetField()
396 tif->tif_postdecode = _TIFFSwab32BitData; in _TIFFVSetField()
402 if ((tif->tif_flags & TIFF_INSUBIFD) == 0) { in _TIFFVSetField()
407 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
409 tif->tif_name); in _TIFFVSetField()
441 v = checkInkNamesString(tif, v, s); in _TIFFVSetField()
451 tif->tif_flags |= TIFF_PERSAMPLE; in _TIFFVSetField()
453 tif->tif_flags &= ~TIFF_PERSAMPLE; in _TIFFVSetField()
469 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
471 tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", in _TIFFVSetField()
503 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
505 tif->tif_name); in _TIFFVSetField()
524 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
526 tif->tif_name, fip->field_type, in _TIFFVSetField()
566 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
569 tif->tif_name, in _TIFFVSetField()
577 tv->value = _TIFFCheckMalloc(tif, tv->count, tv_size, in _TIFFVSetField()
683 const TIFFField* fip=TIFFFieldWithTag(tif,tag); in _TIFFVSetField()
685 TIFFSetFieldBit(tif, fip->field_bit); in _TIFFVSetField()
686 tif->tif_flags |= TIFF_DIRTYDIRECT; in _TIFFVSetField()
694 const TIFFField* fip=TIFFFieldWithTag(tif,tag); in _TIFFVSetField()
695 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
697 tif->tif_name, v, in _TIFFVSetField()
704 const TIFFField* fip=TIFFFieldWithTag(tif,tag); in _TIFFVSetField()
705 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
707 tif->tif_name, v32, in _TIFFVSetField()
714 const TIFFField* fip=TIFFFieldWithTag(tif,tag); in _TIFFVSetField()
715 TIFFErrorExt(tif->tif_clientdata, module, in _TIFFVSetField()
717 tif->tif_name, dblval, in _TIFFVSetField()
734 OkToChangeTag(TIFF* tif, uint32 tag) in OkToChangeTag() argument
736 const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); in OkToChangeTag()
738 TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", "%s: Unknown %stag %u", in OkToChangeTag()
739 tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", tag); in OkToChangeTag()
742 if (tag != TIFFTAG_IMAGELENGTH && (tif->tif_flags & TIFF_BEENWRITING) && in OkToChangeTag()
750 TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", in OkToChangeTag()
752 tif->tif_name, fip->field_name); in OkToChangeTag()
766 TIFFSetField(TIFF* tif, uint32 tag, ...) in TIFFSetField() argument
772 status = TIFFVSetField(tif, tag, ap); in TIFFSetField()
781 TIFFUnsetField(TIFF* tif, uint32 tag) in TIFFUnsetField() argument
783 const TIFFField *fip = TIFFFieldWithTag(tif, tag); in TIFFUnsetField()
784 TIFFDirectory* td = &tif->tif_dir; in TIFFUnsetField()
790 TIFFClrFieldBit(tif, fip->field_bit); in TIFFUnsetField()
813 tif->tif_flags |= TIFF_DIRTYDIRECT; in TIFFUnsetField()
825 TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) in TIFFVSetField() argument
827 return OkToChangeTag(tif, tag) ? in TIFFVSetField()
828 (*tif->tif_tagmethods.vsetfield)(tif, tag, ap) : 0; in TIFFVSetField()
832 _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) in _TIFFVGetField() argument
834 TIFFDirectory* td = &tif->tif_dir; in _TIFFVGetField()
837 const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); in _TIFFVGetField()
892 if (tif->tif_flags & TIFF_PERSAMPLE) in _TIFFVGetField()
906 if (tif->tif_flags & TIFF_PERSAMPLE) in _TIFFVGetField()
952 _TIFFFillStriles( tif ); in _TIFFVGetField()
957 _TIFFFillStriles( tif ); in _TIFFVGetField()
1039 TIFFErrorExt(tif->tif_clientdata, "_TIFFVGetField", in _TIFFVGetField()
1042 tif->tif_name, in _TIFFVGetField()
1160 TIFFGetField(TIFF* tif, uint32 tag, ...) in TIFFGetField() argument
1166 status = TIFFVGetField(tif, tag, ap); in TIFFGetField()
1178 TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) in TIFFVGetField() argument
1180 const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); in TIFFVGetField()
1181 return (fip && (isPseudoTag(tag) || TIFFFieldSet(tif, fip->field_bit)) ? in TIFFVGetField()
1182 (*tif->tif_tagmethods.vgetfield)(tif, tag, ap) : 0); in TIFFVGetField()
1196 TIFFFreeDirectory(TIFF* tif) in TIFFFreeDirectory() argument
1198 TIFFDirectory *td = &tif->tif_dir; in TIFFFreeDirectory()
1216 TIFFClrFieldBit(tif, FIELD_YCBCRSUBSAMPLING); in TIFFFreeDirectory()
1217 TIFFClrFieldBit(tif, FIELD_YCBCRPOSITIONING); in TIFFFreeDirectory()
1256 TIFFCreateDirectory(TIFF* tif) in TIFFCreateDirectory() argument
1258 TIFFDefaultDirectory(tif); in TIFFCreateDirectory()
1259 tif->tif_diroff = 0; in TIFFCreateDirectory()
1260 tif->tif_nextdiroff = 0; in TIFFCreateDirectory()
1261 tif->tif_curoff = 0; in TIFFCreateDirectory()
1262 tif->tif_row = (uint32) -1; in TIFFCreateDirectory()
1263 tif->tif_curstrip = (uint32) -1; in TIFFCreateDirectory()
1269 TIFFCreateCustomDirectory(TIFF* tif, const TIFFFieldArray* infoarray) in TIFFCreateCustomDirectory() argument
1271 TIFFDefaultDirectory(tif); in TIFFCreateCustomDirectory()
1278 _TIFFSetupFields(tif, infoarray); in TIFFCreateCustomDirectory()
1280 tif->tif_diroff = 0; in TIFFCreateCustomDirectory()
1281 tif->tif_nextdiroff = 0; in TIFFCreateCustomDirectory()
1282 tif->tif_curoff = 0; in TIFFCreateCustomDirectory()
1283 tif->tif_row = (uint32) -1; in TIFFCreateCustomDirectory()
1284 tif->tif_curstrip = (uint32) -1; in TIFFCreateCustomDirectory()
1290 TIFFCreateEXIFDirectory(TIFF* tif) in TIFFCreateEXIFDirectory() argument
1294 return TIFFCreateCustomDirectory(tif, exifFieldArray); in TIFFCreateEXIFDirectory()
1301 TIFFDefaultDirectory(TIFF* tif) in TIFFDefaultDirectory() argument
1303 register TIFFDirectory* td = &tif->tif_dir; in TIFFDefaultDirectory()
1307 _TIFFSetupFields(tif, tiffFieldArray); in TIFFDefaultDirectory()
1326 tif->tif_postdecode = _TIFFNoPostDecode; in TIFFDefaultDirectory()
1327 tif->tif_foundfield = NULL; in TIFFDefaultDirectory()
1328 tif->tif_tagmethods.vsetfield = _TIFFVSetField; in TIFFDefaultDirectory()
1329 tif->tif_tagmethods.vgetfield = _TIFFVGetField; in TIFFDefaultDirectory()
1330 tif->tif_tagmethods.printdir = NULL; in TIFFDefaultDirectory()
1336 if (tif->tif_nfieldscompat > 0) { in TIFFDefaultDirectory()
1339 for (i = 0; i < tif->tif_nfieldscompat; i++) { in TIFFDefaultDirectory()
1340 if (tif->tif_fieldscompat[i].allocated_size) in TIFFDefaultDirectory()
1341 _TIFFfree(tif->tif_fieldscompat[i].fields); in TIFFDefaultDirectory()
1343 _TIFFfree(tif->tif_fieldscompat); in TIFFDefaultDirectory()
1344 tif->tif_nfieldscompat = 0; in TIFFDefaultDirectory()
1345 tif->tif_fieldscompat = NULL; in TIFFDefaultDirectory()
1348 (*_TIFFextender)(tif); in TIFFDefaultDirectory()
1349 (void) TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); in TIFFDefaultDirectory()
1358 tif->tif_flags &= ~TIFF_DIRTYDIRECT; in TIFFDefaultDirectory()
1365 tif->tif_flags &= ~TIFF_ISTILED; in TIFFDefaultDirectory()
1371 TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off) in TIFFAdvanceDirectory() argument
1374 if (isMapped(tif)) in TIFFAdvanceDirectory()
1377 if (!(tif->tif_flags&TIFF_BIGTIFF)) in TIFFAdvanceDirectory()
1384 … if (((uint64)poffa!=poff)||(poffb<poffa)||(poffb<(tmsize_t)sizeof(uint16))||(poffb>tif->tif_size)) in TIFFAdvanceDirectory()
1386 TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory count"); in TIFFAdvanceDirectory()
1390 _TIFFmemcpy(&dircount,tif->tif_base+poffa,sizeof(uint16)); in TIFFAdvanceDirectory()
1391 if (tif->tif_flags&TIFF_SWAB) in TIFFAdvanceDirectory()
1395 …offb)||(poffc<dircount*12)||(poffd<poffc)||(poffd<(tmsize_t)sizeof(uint32))||(poffd>tif->tif_size)) in TIFFAdvanceDirectory()
1397 TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory link"); in TIFFAdvanceDirectory()
1402 _TIFFmemcpy(&nextdir32,tif->tif_base+poffc,sizeof(uint32)); in TIFFAdvanceDirectory()
1403 if (tif->tif_flags&TIFF_SWAB) in TIFFAdvanceDirectory()
1414 … if (((uint64)poffa!=poff)||(poffb<poffa)||(poffb<(tmsize_t)sizeof(uint64))||(poffb>tif->tif_size)) in TIFFAdvanceDirectory()
1416 TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory count"); in TIFFAdvanceDirectory()
1419 _TIFFmemcpy(&dircount64,tif->tif_base+poffa,sizeof(uint64)); in TIFFAdvanceDirectory()
1420 if (tif->tif_flags&TIFF_SWAB) in TIFFAdvanceDirectory()
1424 TIFFErrorExt(tif->tif_clientdata,module,"Sanity check on directory count failed"); in TIFFAdvanceDirectory()
1430 …fb)||(poffc<dircount16*20)||(poffd<poffc)||(poffd<(tmsize_t)sizeof(uint64))||(poffd>tif->tif_size)) in TIFFAdvanceDirectory()
1432 TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory link"); in TIFFAdvanceDirectory()
1437 _TIFFmemcpy(nextdir,tif->tif_base+poffc,sizeof(uint64)); in TIFFAdvanceDirectory()
1438 if (tif->tif_flags&TIFF_SWAB) in TIFFAdvanceDirectory()
1445 if (!(tif->tif_flags&TIFF_BIGTIFF)) in TIFFAdvanceDirectory()
1449 if (!SeekOK(tif, *nextdir) || in TIFFAdvanceDirectory()
1450 !ReadOK(tif, &dircount, sizeof (uint16))) { in TIFFAdvanceDirectory()
1451 TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count", in TIFFAdvanceDirectory()
1452 tif->tif_name); in TIFFAdvanceDirectory()
1455 if (tif->tif_flags & TIFF_SWAB) in TIFFAdvanceDirectory()
1458 *off = TIFFSeekFile(tif, in TIFFAdvanceDirectory()
1461 (void) TIFFSeekFile(tif, in TIFFAdvanceDirectory()
1463 if (!ReadOK(tif, &nextdir32, sizeof (uint32))) { in TIFFAdvanceDirectory()
1464 TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory link", in TIFFAdvanceDirectory()
1465 tif->tif_name); in TIFFAdvanceDirectory()
1468 if (tif->tif_flags & TIFF_SWAB) in TIFFAdvanceDirectory()
1476 if (!SeekOK(tif, *nextdir) || in TIFFAdvanceDirectory()
1477 !ReadOK(tif, &dircount64, sizeof (uint64))) { in TIFFAdvanceDirectory()
1478 TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory count", in TIFFAdvanceDirectory()
1479 tif->tif_name); in TIFFAdvanceDirectory()
1482 if (tif->tif_flags & TIFF_SWAB) in TIFFAdvanceDirectory()
1486 TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory count"); in TIFFAdvanceDirectory()
1491 *off = TIFFSeekFile(tif, in TIFFAdvanceDirectory()
1494 (void) TIFFSeekFile(tif, in TIFFAdvanceDirectory()
1496 if (!ReadOK(tif, nextdir, sizeof (uint64))) { in TIFFAdvanceDirectory()
1497 TIFFErrorExt(tif->tif_clientdata, module, in TIFFAdvanceDirectory()
1499 tif->tif_name); in TIFFAdvanceDirectory()
1502 if (tif->tif_flags & TIFF_SWAB) in TIFFAdvanceDirectory()
1513 TIFFNumberOfDirectories(TIFF* tif) in TIFFNumberOfDirectories() argument
1518 if (!(tif->tif_flags&TIFF_BIGTIFF)) in TIFFNumberOfDirectories()
1519 nextdir = tif->tif_header.classic.tiff_diroff; in TIFFNumberOfDirectories()
1521 nextdir = tif->tif_header.big.tiff_diroff; in TIFFNumberOfDirectories()
1523 while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL)) in TIFFNumberOfDirectories()
1530 TIFFErrorExt(tif->tif_clientdata, module, in TIFFNumberOfDirectories()
1544 TIFFSetDirectory(TIFF* tif, uint16 dirn) in TIFFSetDirectory() argument
1549 if (!(tif->tif_flags&TIFF_BIGTIFF)) in TIFFSetDirectory()
1550 nextdir = tif->tif_header.classic.tiff_diroff; in TIFFSetDirectory()
1552 nextdir = tif->tif_header.big.tiff_diroff; in TIFFSetDirectory()
1554 if (!TIFFAdvanceDirectory(tif, &nextdir, NULL)) in TIFFSetDirectory()
1556 tif->tif_nextdiroff = nextdir; in TIFFSetDirectory()
1562 tif->tif_curdir = (dirn - n) - 1; in TIFFSetDirectory()
1567 tif->tif_dirnumber = 0; in TIFFSetDirectory()
1568 return (TIFFReadDirectory(tif)); in TIFFSetDirectory()
1578 TIFFSetSubDirectory(TIFF* tif, uint64 diroff) in TIFFSetSubDirectory() argument
1580 tif->tif_nextdiroff = diroff; in TIFFSetSubDirectory()
1585 tif->tif_dirnumber = 0; in TIFFSetSubDirectory()
1586 return (TIFFReadDirectory(tif)); in TIFFSetSubDirectory()
1593 TIFFCurrentDirOffset(TIFF* tif) in TIFFCurrentDirOffset() argument
1595 return (tif->tif_diroff); in TIFFCurrentDirOffset()
1603 TIFFLastDirectory(TIFF* tif) in TIFFLastDirectory() argument
1605 return (tif->tif_nextdiroff == 0); in TIFFLastDirectory()
1612 TIFFUnlinkDirectory(TIFF* tif, uint16 dirn) in TIFFUnlinkDirectory() argument
1619 if (tif->tif_mode == O_RDONLY) { in TIFFUnlinkDirectory()
1620 TIFFErrorExt(tif->tif_clientdata, module, in TIFFUnlinkDirectory()
1629 if (!(tif->tif_flags&TIFF_BIGTIFF)) in TIFFUnlinkDirectory()
1631 nextdir = tif->tif_header.classic.tiff_diroff; in TIFFUnlinkDirectory()
1636 nextdir = tif->tif_header.big.tiff_diroff; in TIFFUnlinkDirectory()
1641 TIFFErrorExt(tif->tif_clientdata, module, "Directory %d does not exist", dirn); in TIFFUnlinkDirectory()
1644 if (!TIFFAdvanceDirectory(tif, &nextdir, &off)) in TIFFUnlinkDirectory()
1651 if (!TIFFAdvanceDirectory(tif, &nextdir, NULL)) in TIFFUnlinkDirectory()
1658 (void) TIFFSeekFile(tif, off, SEEK_SET); in TIFFUnlinkDirectory()
1659 if (!(tif->tif_flags&TIFF_BIGTIFF)) in TIFFUnlinkDirectory()
1664 if (tif->tif_flags & TIFF_SWAB) in TIFFUnlinkDirectory()
1666 if (!WriteOK(tif, &nextdir32, sizeof (uint32))) { in TIFFUnlinkDirectory()
1667 TIFFErrorExt(tif->tif_clientdata, module, "Error writing directory link"); in TIFFUnlinkDirectory()
1673 if (tif->tif_flags & TIFF_SWAB) in TIFFUnlinkDirectory()
1675 if (!WriteOK(tif, &nextdir, sizeof (uint64))) { in TIFFUnlinkDirectory()
1676 TIFFErrorExt(tif->tif_clientdata, module, "Error writing directory link"); in TIFFUnlinkDirectory()
1687 (*tif->tif_cleanup)(tif); in TIFFUnlinkDirectory()
1688 if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) { in TIFFUnlinkDirectory()
1689 _TIFFfree(tif->tif_rawdata); in TIFFUnlinkDirectory()
1690 tif->tif_rawdata = NULL; in TIFFUnlinkDirectory()
1691 tif->tif_rawcc = 0; in TIFFUnlinkDirectory()
1692 tif->tif_rawdataoff = 0; in TIFFUnlinkDirectory()
1693 tif->tif_rawdataloaded = 0; in TIFFUnlinkDirectory()
1695 tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP|TIFF_POSTENCODE|TIFF_BUF4WRITE); in TIFFUnlinkDirectory()
1696 TIFFFreeDirectory(tif); in TIFFUnlinkDirectory()
1697 TIFFDefaultDirectory(tif); in TIFFUnlinkDirectory()
1698 tif->tif_diroff = 0; /* force link on next write */ in TIFFUnlinkDirectory()
1699 tif->tif_nextdiroff = 0; /* next write must be at end */ in TIFFUnlinkDirectory()
1700 tif->tif_curoff = 0; in TIFFUnlinkDirectory()
1701 tif->tif_row = (uint32) -1; in TIFFUnlinkDirectory()
1702 tif->tif_curstrip = (uint32) -1; in TIFFUnlinkDirectory()