TiffOptions Class

Summary: The tiff file format options.
Note that width and height tags will get overwritten on image creation by width and height parameters so there is no need to specify them directly.
Note that many options return a default value but that does not mean that this option is set explicitly as a tag value. To verify the tag is present use Tags property or the corresponding IsTagPresent method.

Module: aspose.psd.imageoptions

Full Name: aspose.psd.imageoptions.TiffOptions

Inheritance: ImageOptionsBase

Aspose.PSD Version: 24.9.0

Constructors

NameDescription
TiffOptions(expected_format)Initializes a new instance of the TiffOptions class. By default little endian convention is used.
TiffOptions(expected_format, byte_order)Initializes a new instance of the TiffOptions class.
TiffOptions(options)Initializes a new instance of the TiffOptions class.
TiffOptions(tags)Initializes a new instance of the TiffOptions class.

Properties

NameTypeAccessDescription
alpha_storageTiffAlphaStorager/wGets or sets the alpha storage option. Options other than TiffAlphaStorage.UNSPECIFIED
are used when there are more than 3 TiffOptions.samples_per_pixel defined.
artiststringr/wGets or sets the artist.
bits_per_pixelintrGets the bits per pixel.
bits_per_sampleushortr/wGets or sets the bits per sample.
buffer_size_hintintr/wGets or sets the buffer size hint which is defined max allowed size for all internal buffers.
byte_orderTiffByteOrderr/wGets or sets a value indicating the tiff byte order.
color_mapushortr/wGets or sets the color map.
compressed_qualityintr/wGets or sets compressed image quality.
Used with the Jpeg compression.
compressionTiffCompressionsr/wGets or sets the compression.
copyrightstringr/wGets or sets the copyright.
date_timestringr/wGets or sets the date and time.
default_memory_allocation_limitintr/wGets or sets the default memory allocation limit.
default_replacement_fontstringr/wGets or sets the default replacement font (font that will be used to draw text when exporting to raster, if existing layer font in PSD file is not presented in system).
To take proper name of default font can be used next code snippet:
System.Drawing.Text.InstalledFontCollection col = new System.Drawing.Text.InstalledFontCollection();
System.Drawing.FontFamily families = col.Families;
string defaultFontName = families[0].Name;
PsdLoadOptions psdLoadOptions = new PsdLoadOptions() { DefaultReplacementFont = defaultFontName });
disposedboolrGets a value indicating whether this instance is disposed.
document_namestringr/wGets or sets the name of the document.
exif_ifdTiffExifIfdrGets or sets the pointer to EXIF IFD.
fax_t4_optionsGroup3Optionsr/wGets or sets the fax t4 options.
file_standardTiffFileStandardsr/wGets or sets the TIFF file standard.
fill_orderTiffFillOrdersr/wGets or sets the byte bits fill order.
full_frameboolr/wGets or sets a value indicating whether [full frame].
half_tone_hintsushortr/wGets or sets the halftone hints.
image_descriptionstringr/wGets or sets the image description.
image_lengthuintr/wGets or sets the image length.
image_widthuintr/wGets or sets the image width.
ink_namesstringr/wGets or sets the ink names.
is_extra_samples_presentboolrGets a value indicating whether the extra samples is present.
is_tiledboolrGets a value indicating whether image is tiled.
is_validboolrGets a value indicating whether the TiffOptions have been properly configured. Use Validate method as to find the failure reason.
max_sample_valueushortr/wGets or sets the max sample value.
min_sample_valueushortr/wGets or sets the min sample value.
multi_page_optionsMultiPageOptionsr/wThe multipage options
orientationTiffOrientationsr/wGets or sets the orientation.
page_namestringr/wGets or sets the page name.
page_numberushortr/wGets or sets the page number tag.
paletteIColorPaletter/wGets or sets the color palette.
photometricTiffPhotometricsr/wGets or sets the photometric.
planar_configurationTiffPlanarConfigsr/wGets or sets the planar configuration.
predictorTiffPredictorr/wGets or sets the predictor for LZW compression.
premultiply_componentsboolr/wGets or sets a value indicating whether components must be premultiplied.
resolution_settingsResolutionSettingr/wGets or sets the resolution settings.
resolution_unitTiffResolutionUnitsr/wGets or sets the resolution unit.
rows_per_stripuintr/wGets or sets the rows per strip.
sample_formatTiffSampleFormats[]r/wGets or sets the sample format.
samples_per_pixelushortrGets the samples per pixel. To change this property value use the TiffOptions.bits_per_sample property setter.
scanner_manufacturerstringr/wGets or sets the scanner manufacturer.
scanner_modelstringr/wGets or sets the scanner model.
smax_sample_valueuintr/wGets or sets the max sample value. The value has a field type which best matches the sample data (Byte, Short or Long type).
smin_sample_valueuintr/wGets or sets the min sample value. The value has a field type which best matches the sample data (Byte, Short or Long type).
software_typestringr/wGets or sets the software type.
sourceSourcer/wGets or sets the source to create image in.
strip_byte_countsuintr/wGets or sets the strip byte counts.
strip_offsetsuintr/wGets or sets the strip offsets.
sub_file_typeTiffNewSubFileTypesr/wGets or sets a general indication of the kind of data contained in this subfile.
tagsTiffDataType[]r/wGets or sets the tags.
target_printerstringr/wGets or sets the target printer.
threshholdingTiffThresholdsr/wGets or sets the threshholding.
tile_byte_countsuintr/wGets or sets the tile byte counts.
tile_lengthuintr/wGets ot sets tile length.
tile_offsetsuintr/wGets or sets the tile offsets.
tile_widthuintr/wGets ot sets tile width.
total_pagesushortrGets the total pages.
valid_tag_countintrGets the valid tag count. This is not the total tags count but the number of tags which may be preserved.
vector_rasterization_optionsVectorRasterizationOptionsr/wGets or sets the vector rasterization options.
xmp_dataXmpPacketWrapperr/wGets or sets the XMP metadata container.
xp_authorstringr/wGets or sets image author, which used by Windows Explorer.
xp_commentstringr/wGets or sets comment on image, which used by Windows Explorer.
xp_keywordsstringr/wGets or sets subject image, which used by Windows Explorer.
xp_subjectstringr/wGets or sets information about image, which used by Windows Explorer.
xp_titlestringr/wGets or sets information about image, which used by Windows Explorer.
xpositionTiffRationalr/wGets or sets the x position.
xresolutionTiffRationalr/wGets or sets the x resolution.
y_cb_cr_coefficientsTiffRational[]r/wGets or sets the YCbCrCoefficients.
y_cb_cr_subsamplingushortr/wGets or sets the subsampling factors for YCbCr photometric.
ypositionTiffRationalr/wGets or sets the y position.
yresolutionTiffRationalr/wGets or sets the y resolution.

Methods

NameDescription
add_tag(tag_to_add)Adds a new tag.
add_tags(tags_to_add)Adds the tags.
clone()Clones this instance.
get_tag_by_type(tag_key)Gets the instance of the tag by type.
get_valid_tags_count(tags)Gets the valid tags count.
is_tag_present(tag)Determines whether tag is present in the options or not.
remove_tag(tag)Removes the tag.
validate()Validates if options have valid combination of tags

Constructor: TiffOptions(expected_format)

 TiffOptions(expected_format) 

Initializes a new instance of the TiffOptions class. By default little endian convention is used.

Parameters:

ParameterTypeDescription
expected_formatTiffExpectedFormatThe expected tiff file format.

Constructor: TiffOptions(expected_format, byte_order)

 TiffOptions(expected_format, byte_order) 

Initializes a new instance of the TiffOptions class.

Parameters:

ParameterTypeDescription
expected_formatTiffExpectedFormatThe expected tiff file format.
byte_orderTiffByteOrderThe tiff file format byte order to use.

Constructor: TiffOptions(options)

 TiffOptions(options) 

Initializes a new instance of the TiffOptions class.

Parameters:

ParameterTypeDescription
optionsTiffOptionsThe options to copy from.

Constructor: TiffOptions(tags)

 TiffOptions(tags) 

Initializes a new instance of the TiffOptions class.

Parameters:

ParameterTypeDescription
tagsTiffDataType[]The tags to initialize options with.

Method: add_tag(tag_to_add)

 add_tag(tag_to_add) 

Adds a new tag.

Parameters:

ParameterTypeDescription
tag_to_addTiffDataTypeThe tag to add.

Method: add_tags(tags_to_add)

 add_tags(tags_to_add) 

Adds the tags.

Parameters:

ParameterTypeDescription
tags_to_addTiffDataType[]The tags to add.

Method: clone()

 clone() 

Clones this instance.

Returns

TypeDescription
ImageOptionsBaseReturns shallow copy of this instance

Method: get_tag_by_type(tag_key)

 get_tag_by_type(tag_key) 

Gets the instance of the tag by type.

Parameters:

ParameterTypeDescription
tag_keyTiffTagsThe tag key.

Returns

TypeDescription
TiffDataTypeInstance of the tag if exists or null otherwise.

Method: get_valid_tags_count(tags) [static]

 get_valid_tags_count(tags) 

Gets the valid tags count.

Parameters:

ParameterTypeDescription
tagsTiffDataType[]The tags to validate.

Returns

TypeDescription
intThe valid tags count.

Method: is_tag_present(tag)

 is_tag_present(tag) 

Determines whether tag is present in the options or not.

Parameters:

ParameterTypeDescription
tagTiffTagsThe tag id to check.

Returns

TypeDescription
booltrue if tag is present; otherwise, false.

Method: remove_tag(tag)

 remove_tag(tag) 

Removes the tag.

Parameters:

ParameterTypeDescription
tagTiffTagsThe tag to remove.

Returns

TypeDescription
booltrue if successfully removed