Home | History | Annotate | Download | only in coders

Lines Matching refs:tiff

13 %                        Read/Write TIFF Image Format                         %
95 # include "tiff.h"
243 % magick string, is TIFF.
364 Write raw CCITT Group 4 wrapped as a TIFF image file.
409 Read TIFF image.
580 static void TIFFGetProfiles(TIFF *tiff,Image *image,MagickBooleanType ping,
593 if ((TIFFGetField(tiff,TIFFTAG_ICCPROFILE,&length,&profile) == 1) &&
598 if ((TIFFGetField(tiff,TIFFTAG_PHOTOSHOP,&length,&profile) == 1) &&
603 if ((TIFFGetField(tiff,TIFFTAG_RICHTIFFIPTC,&length,&profile) == 1) &&
606 if (TIFFIsByteSwapped(tiff) != 0)
612 if ((TIFFGetField(tiff,TIFFTAG_XMLPACKET,&length,&profile) == 1) &&
616 if ((TIFFGetField(tiff,34118,&length,&profile) == 1) &&
618 (void) ReadProfile(image,"tiff:34118",profile,(ssize_t) length,
621 if ((TIFFGetField(tiff,37724,&length,&profile) == 1) &&
623 (void) ReadProfile(image,"tiff:37724",profile,(ssize_t) length,exception);
626 static void TIFFGetProperties(TIFF *tiff,Image *image,ExceptionInfo *exception)
641 if (TIFFGetField(tiff,TIFFTAG_ARTIST,&text) == 1)
642 (void) SetImageProperty(image,"tiff:artist",text,exception);
643 if (TIFFGetField(tiff,TIFFTAG_COPYRIGHT,&text) == 1)
644 (void) SetImageProperty(image,"tiff:copyright",text,exception);
645 if (TIFFGetField(tiff,TIFFTAG_DATETIME,&text) == 1)
646 (void) SetImageProperty(image,"tiff:timestamp",text,exception);
647 if (TIFFGetField(tiff,TIFFTAG_DOCUMENTNAME,&text) == 1)
648 (void) SetImageProperty(image,"tiff:document",text,exception);
649 if (TIFFGetField(tiff,TIFFTAG_HOSTCOMPUTER,&text) == 1)
650 (void) SetImageProperty(image,"tiff:hostcomputer",text,exception);
651 if (TIFFGetField(tiff,TIFFTAG_IMAGEDESCRIPTION,&text) == 1)
653 if (TIFFGetField(tiff,TIFFTAG_MAKE,&text) == 1)
654 (void) SetImageProperty(image,"tiff:make",text,exception);
655 if (TIFFGetField(tiff,TIFFTAG_MODEL,&text) == 1)
656 (void) SetImageProperty(image,"tiff:model",text,exception);
657 if (TIFFGetField(tiff,TIFFTAG_OPIIMAGEID,&count,&text) == 1)
662 (void) SetImageProperty(image,"tiff:image-id",message,exception);
664 if (TIFFGetField(tiff,TIFFTAG_PAGENAME,&text) == 1)
666 if (TIFFGetField(tiff,TIFFTAG_SOFTWARE,&text) == 1)
667 (void) SetImageProperty(image,"tiff:software",text,exception);
668 if (TIFFGetField(tiff,33423,&count,&text) == 1)
673 (void) SetImageProperty(image,"tiff:kodak-33423",message,exception);
675 if (TIFFGetField(tiff,36867,&count,&text) == 1)
680 (void) SetImageProperty(image,"tiff:kodak-36867",message,exception);
682 if (TIFFGetField(tiff,TIFFTAG_SUBFILETYPE,&type) == 1)
687 (void) SetImageProperty(image,"tiff:subfiletype","REDUCEDIMAGE",
693 (void) SetImageProperty(image,"tiff:subfiletype","PAGE",exception);
698 (void) SetImageProperty(image,"tiff:subfiletype","MASK",exception);
704 if (TIFFGetField(tiff,37706,&length,&tietz) == 1)
707 (void) SetImageProperty(image,"tiff:tietz_offset",message,exception);
711 static void TIFFGetEXIFProperties(TIFF *tiff,Image *image,
738 if (TIFFGetField(tiff,TIFFTAG_EXIFIFD,&offset) != 1)
740 directory=TIFFCurrentDirectory(tiff);
741 if (TIFFReadEXIFDirectory(tiff,offset) != 1)
743 TIFFSetDirectory(tiff,directory);
758 if ((TIFFGetField(tiff,exif_info[i].tag,&ascii,&sans,&sans) == 1) &&
771 if (TIFFGetField(tiff,exif_info[i].tag,&shorty,&sans,&sans) == 1)
785 tiff_status=TIFFGetField(tiff,exif_info[i].tag,&shorty_num,&shorty,
799 if (TIFFGetField(tiff,exif_info[i].tag,&longy,&sans,&sans) == 1)
810 if (TIFFGetField(tiff,exif_info[i].tag,&long8y,&sans,&sans) == 1)
824 if (TIFFGetField(tiff,exif_info[i].tag,&floaty,&sans,&sans) == 1)
835 if (TIFFGetField(tiff,exif_info[i].tag,&doubley,&sans,&sans) == 1)
845 TIFFSetDirectory(tiff,directory);
847 (void) tiff;
872 static int32 TIFFReadPixels(TIFF *tiff,size_t bits_per_sample,
879 status=TIFFReadScanline(tiff,scanline,(uint32) row,sample);
925 static TIFFMethodType GetJPEGMethod(Image* image,TIFF *tiff,uint16 photometric,
958 if (!TIFFGetField(tiff,TIFFTAG_STRIPOFFSETS,&value))
1023 tiff:ignore-layers");
1026 layer_info=GetImageProfile(image,"tiff:37724");
1049 (void) DeleteImageProfile(layers,"tiff:37724");
1062 SetImageArtifact(image,"tiff:has-layers","true");
1066 SetImageArtifact(layers,"tiff:has-layers","true");
1117 TIFF
1118 *tiff;
1166 tiff=TIFFClientOpen(image->filename,"rb",(thandle_t) image,TIFFReadBlob,
1169 if (tiff == (TIFF *) NULL)
1181 if (image_info->scene < (size_t) TIFFNumberOfDirectories(tiff))
1185 status=TIFFReadDirectory(tiff) != 0 ? MagickTrue : MagickFalse;
1188 TIFFClose(tiff);
1195 TIFFClose(tiff);
1207 TIFFPrintDirectory(tiff,stdout,MagickFalse);
1209 if ((TIFFGetField(tiff,TIFFTAG_IMAGEWIDTH,&width) != 1) ||
1210 (TIFFGetField(tiff,TIFFTAG_IMAGELENGTH,&height) != 1) ||
1211 (TIFFGetFieldDefaulted(tiff,TIFFTAG_COMPRESSION,&compress_tag) != 1) ||
1212 (TIFFGetFieldDefaulted(tiff,TIFFTAG_FILLORDER,&endian) != 1) ||
1213 (TIFFGetFieldDefaulted(tiff,TIFFTAG_PLANARCONFIG,&interlace) != 1) ||
1214 (TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,&samples_per_pixel) != 1) ||
1215 (TIFFGetFieldDefaulted(tiff,TIFFTAG_BITSPERSAMPLE,&bits_per_sample) != 1) ||
1216 (TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLEFORMAT,&sample_format) != 1) ||
1217 (TIFFGetFieldDefaulted(tiff,TIFFTAG_MINSAMPLEVALUE,&min_sample_value) != 1) ||
1218 (TIFFGetFieldDefaulted(tiff,TIFFTAG_MAXSAMPLEVALUE,&max_sample_value) != 1) ||
1219 (TIFFGetFieldDefaulted(tiff,TIFFTAG_PHOTOMETRIC,&photometric) != 1))
1221 TIFFClose(tiff);
1231 (void) SetImageProperty(image,"tiff:photometric","min-is-black",
1237 (void) SetImageProperty(image,"tiff:photometric","min-is-white",
1243 (void) SetImageProperty(image,"tiff:photometric","palette",exception);
1248 (void) SetImageProperty(image,"tiff:photometric","RGB",exception);
1253 (void) SetImageProperty(image,"tiff:photometric","CIELAB",exception);
1258 (void) SetImageProperty(image,"tiff:photometric","CIE Log2(L)",
1264 (void) SetImageProperty(image,"tiff:photometric","LOGLUV",exception);
1270 (void) SetImageProperty(image,"tiff:photometric","MASK",exception);
1276 (void) SetImageProperty(image,"tiff:photometric","separated",exception);
1281 (void) SetImageProperty(image,"tiff:photometric","YCBCR",exception);
1286 (void) SetImageProperty(image,"tiff:photometric","unknown",exception);
1303 "interpretation: %s",GetImageProperty(image,"tiff:photometric",
1316 if (TIFFIsBigEndian(tiff) == 0)
1318 (void) SetImageProperty(image,"tiff:endian","lsb",exception);
1323 (void) SetImageProperty(image,"tiff:endian","msb",exception);
1334 TIFFGetProfiles(tiff,image,image_info->ping,exception);
1335 TIFFGetProperties(tiff,image,exception);
1336 option=GetImageOption(image_info,"tiff:exif-properties");
1338 TIFFGetEXIFProperties(tiff,image,exception);
1339 (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,
1341 if ((TIFFGetFieldDefaulted(tiff,TIFFTAG_XRESOLUTION,&x_resolution) == 1) &&
1342 (TIFFGetFieldDefaulted(tiff,TIFFTAG_YRESOLUTION,&y_resolution) == 1))
1347 if (TIFFGetFieldDefaulted(tiff,TIFFTAG_RESOLUTIONUNIT,&units) == 1)
1354 if ((TIFFGetFieldDefaulted(tiff,TIFFTAG_XPOSITION,&x_position) == 1) &&
1355 (TIFFGetFieldDefaulted(tiff,TIFFTAG_YPOSITION,&y_position) == 1))
1360 if (TIFFGetFieldDefaulted(tiff,TIFFTAG_ORIENTATION,&orientation) == 1)
1362 if (TIFFGetField(tiff,TIFFTAG_WHITEPOINT,&chromaticity) == 1)
1370 if (TIFFGetField(tiff,TIFFTAG_PRIMARYCHROMATICITIES,&chromaticity) == 1)
1386 TIFFClose(tiff);
1410 tiff_status=TIFFGetFieldDefaulted(tiff,TIFFTAG_YCBCRSUBSAMPLING,
1440 TIFFClose(tiff);
1451 TIFFClose(tiff);
1471 tiff_status=TIFFGetFieldDefaulted(tiff,TIFFTAG_EXTRASAMPLES,&extra_samples,
1475 (void) SetImageProperty(image,"tiff:alpha","unspecified",exception);
1488 (void) SetImageProperty(image,"tiff:alpha","associated",
1493 (void) SetImageProperty(image,"tiff:alpha","unassociated",
1506 TIFFClose(tiff);
1511 if (TIFFGetFieldDefaulted(tiff,TIFFTAG_PAGENUMBER,&value,&pages) == 1)
1529 tiff_status=TIFFGetField(tiff,TIFFTAG_COLORMAP,&red_colormap,
1573 if (TIFFGetField(tiff,TIFFTAG_ROWSPERSTRIP,&rows_per_strip) == 1)
1581 (void) SetImageProperty(image,"tiff:rows-per-strip",value,exception);
1600 method=GetJPEGMethod(image,tiff,photometric,bits_per_sample,
1604 if (TIFFIsTiled(tiff) != MagickFalse)
1614 Convert TIFF image to PseudoClass MIFF image.
1642 TIFFClose(tiff);
1654 status=TIFFReadPixels(tiff,bits_per_sample,0,y,(char *) pixels);
1677 Convert TIFF image to DirectClass MIFF image.
1699 TIFFClose(tiff);
1711 status=TIFFReadPixels(tiff,bits_per_sample,0,y,(char *) pixels);
1734 Convert TIFF image to DirectClass MIFF image.
1746 status=TIFFReadPixels(tiff,bits_per_sample,(tsample_t) i,y,(char *)
1804 status=TIFFReadPixels(tiff,bits_per_sample,0,y,(char *) pixels);
1842 Convert stripped TIFF image to DirectClass MIFF image.
1859 if (TIFFReadRGBAStrip(tiff,(tstrip_t) y,(uint32 *) pixels) == 0)
1903 Convert tiled TIFF image to DirectClass MIFF image.
1905 if ((TIFFGetField(tiff,TIFFTAG_TILEWIDTH,&columns) != 1) ||
1906 (TIFFGetField(tiff,TIFFTAG_TILELENGTH,&rows) != 1))
1908 TIFFClose(tiff);
1915 TIFFClose(tiff);
1922 TIFFClose(tiff);
1951 if (TIFFReadRGBATile(tiff,(uint32) x,(uint32) y,tile_pixels) == 0)
2017 Convert TIFF image to DirectClass MIFF image.
2022 TIFFClose(tiff);
2029 TIFFClose(tiff);
2033 (void) TIFFReadRGBAImage(tiff,(uint32) image->columns,(uint32)
2098 status=TIFFReadDirectory(tiff) != 0 ? MagickTrue : MagickFalse;
2117 TIFFClose(tiff);
2144 % RegisterTIFFImage() adds properties for the TIFF image format to
2161 static void TIFFIgnoreTags(TIFF *tiff)
2182 if (TIFFGetReadProc(tiff) != TIFFReadBlob)
2184 image=(Image *)TIFFClientdata(tiff);
2185 tags=GetImageArtifact(image,"tiff:ignore-tags");
2225 (void) TIFFMergeFieldInfo(tiff,ignore,(uint32) count);
2229 static void TIFFTagExtender(TIFF *tiff)
2240 TIFFMergeFieldInfo(tiff,TIFFExtensions,sizeof(TIFFExtensions)/
2243 (*tag_extender)(tiff);
2244 TIFFIgnoreTags(tiff);
2293 entry=AcquireMagickInfo("TIFF","GROUP4","Raw CCITT Group4");
2304 entry->mime_type=ConstantString("image/tiff");
2306 entry=AcquireMagickInfo("TIFF","PTIF","Pyramid encoded TIFF");
2314 entry->mime_type=ConstantString("image/tiff");
2316 entry=AcquireMagickInfo("TIFF","TIF",TIFFDescription);
2327 entry->mime_type=ConstantString("image/tiff");
2329 entry=AcquireMagickInfo("TIFF","TIFF",TIFFDescription);
2340 entry->mime_type=ConstantString("image/tiff");
2342 entry=AcquireMagickInfo("TIFF","TIFF64","Tagged Image File Format (64-bit)");
2353 entry->mime_type=ConstantString("image/tiff");
2370 % UnregisterTIFFImage() removes format registrations made by the TIFF module
2381 (void) UnregisterMagickInfo("TIFF");
2459 TIFF
2460 *tiff;
2470 Write image as CCITT Group4 TIFF image to a temporary file.
2500 (void) FormatLocaleString(huffman_image->filename,MagickPathExtent,"tiff:%s",
2520 tiff=TIFFOpen(filename,"rb");
2521 if (tiff == (TIFF *) NULL)
2533 if (TIFFGetField(tiff,TIFFTAG_STRIPBYTECOUNTS,&byte_count) != 1)
2535 TIFFClose(tiff);
2542 for (i=1; i < (ssize_t) TIFFNumberOfStrips(tiff); i++)
2549 TIFFClose(tiff);
2559 for (i=0; i < (ssize_t) TIFFNumberOfStrips(tiff); i++)
2561 count=(ssize_t) TIFFReadRawStrip(tiff,(uint32) i,buffer,strip_size);
2566 TIFFClose(tiff);
2627 Create pyramid-encoded TIFF image.
2640 (void) SetImageProperty(clone_image,"tiff:subfiletype","none",exception);
2655 (void) SetImageProperty(pyramid_image,"tiff:subfiletype","REDUCEDIMAGE",
2662 Write pyramid-encoded TIFF image.
2666 (void) CopyMagickString(write_info->magick,"TIFF",MagickPathExtent);
2667 (void) CopyMagickString(images->magick,"TIFF",MagickPathExtent);
2779 TIFF *tiff,TIFFInfo *tiff_info)
2793 option=GetImageOption(image_info,"tiff:tile-geometry");
2801 TIFFDefaultTileSize(tiff,&tile_columns,&tile_rows);
2802 (void) TIFFSetField(tiff,TIFFTAG_TILEWIDTH,tile_columns);
2803 (void) TIFFSetField(tiff,TIFFTAG_TILELENGTH,tile_rows);
2807 tile_rows*TIFFScanlineSize(tiff),sizeof(*tiff_info->scanlines));
2809 tile_rows*TIFFTileSize(tiff),sizeof(*tiff_info->scanlines));
2819 static int32 TIFFWritePixels(TIFF *tiff,TIFFInfo *tiff_info,ssize_t row,
2842 if (TIFFIsTiled(tiff) == 0)
2843 return(TIFFWriteScanline(tiff,tiff_info->scanline,(uint32) row,sample));
2847 i=(ssize_t) (row % tiff_info->tile_geometry.height)*TIFFScanlineSize(tiff);
2849 (size_t) TIFFScanlineSize(tiff));
2855 Write tile to TIFF image.
2858 bytes_per_pixel=TIFFTileSize(tiff)/(ssize_t) (
2871 p=tiff_info->scanlines+(j*TIFFScanlineSize(tiff)+(i*
2873 q=tiff_info->pixels+(j*TIFFTileRowSize(tiff)+k/8);
2877 p=tiff_info->scanlines+(j*TIFFScanlineSize(tiff)+(i*
2879 q=tiff_info->pixels+(j*TIFFTileRowSize(tiff)+k*bytes_per_pixel);
2884 status=TIFFWriteTile(tiff,tiff_info->pixels,(uint32) (i*
2894 static void TIFFSetProfiles(TIFF *tiff,Image *image)
2915 (void) TIFFSetField(tiff,TIFFTAG_XMLPACKET,(uint32) GetStringInfoLength(
2920 (void) TIFFSetField(tiff,TIFFTAG_ICCPROFILE,(uint32) GetStringInfoLength(
2935 if (TIFFIsByteSwapped(tiff))
2938 (void) TIFFSetField(tiff,TIFFTAG_RICHTIFFIPTC,(uint32)
2944 (void) TIFFSetField(tiff,TIFFTAG_PHOTOSHOP,(uint32)
2947 if (LocaleCompare(name,"tiff:37724") == 0)
2948 (void) TIFFSetField(tiff,37724,(uint32) GetStringInfoLength(profile),
2950 if (LocaleCompare(name,"tiff:34118") == 0)
2951 (void) TIFFSetField(tiff,34118,(uint32) GetStringInfoLength(profile),
2957 static void TIFFSetProperties(TIFF *tiff,const ImageInfo *image_info,
2963 value=GetImageArtifact(image,"tiff:document");
2965 (void) TIFFSetField(tiff,TIFFTAG_DOCUMENTNAME,value);
2966 value=GetImageArtifact(image,"tiff:hostcomputer");
2968 (void) TIFFSetField(tiff,TIFFTAG_HOSTCOMPUTER,value);
2969 value=GetImageArtifact(image,"tiff:artist");
2971 (void) TIFFSetField(tiff,TIFFTAG_ARTIST,value);
2972 value=GetImageArtifact(image,"tiff:timestamp");
2974 (void) TIFFSetField(tiff,TIFFTAG_DATETIME,value);
2975 value=GetImageArtifact(image,"tiff:make");
2977 (void) TIFFSetField(tiff,TIFFTAG_MAKE,value);
2978 value=GetImageArtifact(image,"tiff:model");
2980 (void) TIFFSetField(tiff,TIFFTAG_MODEL,value);
2981 value=GetImageArtifact(image,"tiff:software");
2983 (void) TIFFSetField(tiff,TIFFTAG_SOFTWARE,value);
2984 value=GetImageArtifact(image,"tiff:copyright");
2986 (void) TIFFSetField(tiff,TIFFTAG_COPYRIGHT,value);
2989 (void) TIFFSetField(tiff,33423,value);
2992 (void) TIFFSetField(tiff,36867,value);
2995 (void) TIFFSetField(tiff,TIFFTAG_PAGENAME,value);
2998 (void) TIFFSetField(tiff,TIFFTAG_IMAGEDESCRIPTION,value);
2999 value=GetImageArtifact(image,"tiff:subfiletype");
3003 (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_REDUCEDIMAGE);
3006 (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_PAGE);
3009 (void) TIFFSetField(tiff
3020 (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_PAGE);
3021 (void) TIFFSetField(tiff,TIFFTAG_PAGENUMBER,page,pages);
3025 static void TIFFSetEXIFProperties(TIFF *tiff,Image *image,
3042 (void) TIFFSetField(tiff,TIFFTAG_SUBIFD,1,&offset);
3052 (void) TIFFSetField(tiff,exif_info[i].tag,value);
3061 (void) TIFFSetField(tiff,exif_info[i].tag,field);
3070 (void) TIFFSetField(tiff,exif_info[i].tag,field);
3080 (void) TIFFSetField(tiff,exif_info[i].tag,field);
3087 /* (void) TIFFSetField(tiff,TIFFTAG_EXIFIFD,offset); */
3089 (void) tiff;
3098 #define TIFFDefaultStripSize(tiff,request) (8192UL/TIFFScanlineSize(tiff))
3133 TIFF
3134 *tiff;
3152 Open TIFF file.
3167 option=GetImageOption(image_info,"tiff:endian");
3190 tiff=TIFFClientOpen(image->filename,mode,(thandle_t) image,TIFFReadBlob,
3193 if (tiff == (TIFF *) NULL)
3201 Initialize TIFF fields.
3242 (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_REDUCEDIMAGE);
3246 (void) TIFFSetField(tiff,TIFFTAG_IMAGELENGTH,(uint32) image->rows);
3247 (void) TIFFSetField(tiff,TIFFTAG_IMAGEWIDTH,(uint32) image->columns);
3351 (void) TIFFSetField(tiff,TIFFTAG_SAMPLESPERPIXEL,4);
3352 (void) TIFFSetField(tiff,TIFFTAG_INKSET,INKSET_CMYK);
3357 Full color TIFF raster.
3368 (void) TIFFSetField(tiff,TIFFTAG_YCBCRSUBSAMPLING,1,1);
3374 (void) TIFFSetField(tiff,TIFFTAG_SAMPLESPERPIXEL,3);
3384 (void) TIFFSetField(tiff,TIFFTAG_SAMPLESPERPIXEL,1);
3396 Colormapped TIFF raster.
3398 (void) TIFFSetField(tiff,TIFFTAG_SAMPLESPERPIXEL,1);
3410 (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_FILLORDER,&endian);
3424 option=GetImageOption(image_info,"tiff:fill-order");
3432 (void) TIFFSetField(tiff,TIFFTAG_COMPRESSION,compress_tag);
3433 (void) TIFFSetField(tiff,TIFFTAG_FILLORDER,endian);
3434 (void) TIFFSetField(tiff,TIFFTAG_BITSPERSAMPLE,quantum_info->depth);
3443 TIFF has a matte channel.
3447 option=GetImageOption(image_info,"tiff:alpha");
3456 (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,
3458 (void) TIFFSetField(tiff,TIFFTAG_SAMPLESPERPIXEL,samples_per_pixel+1);
3459 (void) TIFFSetField(tiff,TIFFTAG_EXTRASAMPLES,extra_samples,
3464 (void) TIFFSetField(tiff,TIFFTAG_PHOTOMETRIC,photometric);
3469 (void) TIFFSetField(tiff,TIFFTAG_SAMPLEFORMAT,SAMPLEFORMAT_IEEEFP);
3470 (void) TIFFSetField(tiff,TIFFTAG_SMINSAMPLEVALUE,quantum_info->minimum);
3471 (void) TIFFSetField(tiff,TIFFTAG_SMAXSAMPLEVALUE,quantum_info->maximum);
3476 (void) TIFFSetField(tiff,TIFFTAG_SAMPLEFORMAT,SAMPLEFORMAT_INT);
3481 (void) TIFFSetField(tiff,TIFFTAG_SAMPLEFORMAT,SAMPLEFORMAT_UINT);
3487 (void) TIFFSetField(tiff,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT);
3488 (void) TIFFSetField(tiff,TIFFTAG_PLANARCONFIG,PLANARCONFIG_CONTIG);
3492 (void) TIFFSetField(tiff,TIFFTAG_PLANARCONFIG,PLANARCONFIG_SEPARATE);
3493 rows_per_strip=TIFFDefaultStripSize(tiff,0);
3494 option=GetImageOption(image_info,"tiff:rows-per-strip");
3513 (void) TIFFSetField(tiff,TIFFTAG_JPEGQUALITY,image_info->quality);
3514 (void) TIFFSetField(tiff,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RAW);
3520 (void) TIFFSetField(tiff,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RGB);
3538 (void) TIFFSetField(tiff,TIFFTAG_YCBCRSUBSAMPLING,(uint16)
3542 (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_BITSPERSAMPLE,
3545 (void) TIFFSetField(tiff,TIFFTAG_JPEGTABLESMODE,JPEGTABLESMODE_QUANT);
3552 (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_BITSPERSAMPLE,
3557 (void) TIFFSetField(tiff,TIFFTAG_PREDICTOR,PREDICTOR_HORIZONTAL);
3558 (void) TIFFSetField(tiff,TIFFTAG_ZIPQUALITY,(long) (
3569 (void) TIFFSetField(tiff,TIFFTAG_GROUP3OPTIONS,4);
3583 (void) TIFFSetField(tiff,TIFFTAG_PREDICTOR,PREDICTOR_HORIZONTAL);
3584 (void) TIFFSetField(tiff,TIFFTAG_LZMAPRESET,(long) (
3592 (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_BITSPERSAMPLE,
3597 (void) TIFFSetField(tiff,TIFFTAG_PREDICTOR,PREDICTOR_HORIZONTAL);
3607 (void) TIFFSetField(tiff,TIFFTAG_ROWSPERSTRIP,rows_per_strip);
3621 (void) TIFFSetField(tiff,TIFFTAG_RESOLUTIONUNIT,(uint16) units);
3622 (void) TIFFSetField(tiff,TIFFTAG_XRESOLUTION,image->resolution.x);
3623 (void) TIFFSetField(tiff,TIFFTAG_YRESOLUTION,image->resolution.y);
3626 "TIFF: negative image positions unsupported","%s",image->filename);
3632 (void) TIFFSetField(tiff,TIFFTAG_XPOSITION,(float) image->page.x/
3640 (void) TIFFSetField(tiff,TIFFTAG_YPOSITION,(float) image->page.y/
3658 (void) TIFFSetField(tiff,TIFFTAG_PRIMARYCHROMATICITIES,chromaticity);
3661 (void) TIFFSetField(tiff,TIFFTAG_WHITEPOINT,chromaticity);
3666 (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_PAGE);
3668 (void) TIFFSetField(tiff,TIFFTAG_PAGENUMBER,(uint16) image->scene,
3672 (void) TIFFSetField(tiff,TIFFTAG_ORIENTATION,(uint16) image->orientation);
3673 (void) TIFFSetProfiles(tiff,image);
3683 (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_PAGE);
3684 (void) TIFFSetField(tiff,TIFFTAG_PAGENUMBER,page,pages);
3686 (void) TIFFSetProperties(tiff,image_info,image,exception);
3690 (void) TIFFSetEXIFProperties(tiff,image,exception);
3694 if (GetTIFFInfo(image_info,tiff,&tiff_info) == MagickFalse)
3706 RGB TIFF image.
3727 if (TIFFWritePixels(tiff,&tiff_info,y,0,image) == -1)
3755 if (TIFFWritePixels(tiff,&tiff_info,y,0,image) == -1)
3774 if (TIFFWritePixels(tiff,&tiff_info,y,1,image) == -1)
3793 if (TIFFWritePixels(tiff,&tiff_info,y,2,image) == -1)
3813 if (TIFFWritePixels(tiff,&tiff_info,y,3,image) == -1)
3830 CMYK TIFF image.
3847 if (TIFFWritePixels(tiff,&tiff_info,y,0,image) == -1)
3867 Colormapped TIFF image.
3876 Initialize TIFF colormap.
3887 (void) TIFFSetField(tiff,TIFFTAG_COLORMAP,red,green,blue);
3918 if (TIFFWritePixels(tiff,&tiff_info,y,0,image) == -1)
3938 TIFFPrintDirectory(tiff,stdout,MagickFalse);
3939 (void) TIFFWriteDirectory(tiff);
3948 TIFFClose(tiff);