Platforms to show: All Mac Windows Linux Cross-Platform
Back to TiffPictureMBS class.
TiffPictureMBS.Scanlines(index as Integer, count as Integer, sample as Integer = 0, lineStepScanlines as Integer = 1, lineStepReturn as Integer = 1) as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | TIFF | MBS Images Plugin | 4.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns nil on any error.
If you set the value, make sure the Memoryblock is big enough. The BytesPerRow functions returns the number of bytes needed.
The data for this property is stored in the Tiff file.
The first scanline has the index of 0. Count is the number of scanlines you want to read/write.
If lineStepScanlines is >1, we skip scan lines so we read less data.
If lineStepReturn is >1, we return only every nth row.
If rows can be read with skipping, you should try lineStepScanlines = 2 or more for skipping lines.
If that doesn't work due to tiled data, you can use lineStepReturn = 2 or more.
This skipping is to quicker get preview pictures.
(Read and Write computed property)
Some examples using this property:
TiffPictureMBS.ScanlinesScaled(index as integer, count as integer, sample as integer = 0, scaleFactor as Integer = 1) as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 19.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns nil on any error.
The data for this property is stored in the Tiff file.
The first scanline has the index of 0. Count is the number of scanlines you want to read/write.
If scaleFactor is >1, we scale down and return scaleFactor rows reduced to one row.
This scaling down is to quicker get preview pictures.
Some examples using this method:
TiffPictureMBS.SetColorMap(red as memoryblock, green as memoryblock, blue as memoryblock) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 9.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The memoryblock must be 2^bitspersample * 2 bytes big.
Returns true on success and false on failure.
TiffPictureMBS.SetColorProfile(ProfileData as String) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 7.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success and false on failure.
TiffPictureMBS.SetData(Tag as Integer, data as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
TiffPictureMBS.SetFieldByte(Tag as Integer, value as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 8.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please look for Tag values in the tiff specification.
Returns true on success.
Please make sure to use the correct setter depending on data type associated with the tag.
TiffPictureMBS.SetFieldDouble(Tag as Integer, value as Double) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 7.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please look for Tag values in the tiff specification.
Returns true on success.
Please make sure to use the correct setter depending on data type associated with the tag.
TiffPictureMBS.SetFieldInteger(Tag as Integer, value as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 7.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please look for Tag values in the tiff specification.
Returns true on success.
Please make sure to use the correct setter depending on data type associated with the tag.
Some examples using this method:
TiffPictureMBS.SetFieldMemory(Tag as Integer, ItemCount as Integer, data as memoryblock) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 8.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This is the special version of the setter which passes a memoryblock and a count value so you can set an array using this method.
Please look for Tag values in the tiff specification.
Returns true on success.
Please make sure to use the correct setter depending on data type associated with the tag.
Some examples using this method:
TiffPictureMBS.SetFieldShort(Tag as Integer, value as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 7.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please look for Tag values in the tiff specification.
Returns true on success.
Please make sure to use the correct setter depending on data type associated with the tag.
TiffPictureMBS.SetFieldSingle(Tag as Integer, value as Single) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 8.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please look for Tag values in the tiff specification.
Returns true on success.
Please make sure to use the correct setter depending on data type associated with the tag.
TiffPictureMBS.SetFieldString(Tag as Integer, value as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 8.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please look for Tag values in the tiff specification.
Returns true on success.
Please make sure to use the correct setter depending on data type associated with the tag.
You have to pass in the string with the correct encoding.
Some examples using this method:
TiffPictureMBS.SetImageIndex(index as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 4.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Reads automatically a RGB picture for you, so the pict property is filled on success.
Returns true on success.
Index is zero based.
See also:
TiffPictureMBS.SetImageIndex(index as Integer, HeaderOnly as boolean) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 4.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If HeaderOnly is false the current picture is read into the pict&mask properties.
Returns true on success.
See also:
TiffPictureMBS.SetXMP(ProfileData as String) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 7.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success and false on failure.
TiffPictureMBS.VStripSize(nrows as UInt32) as UInt64
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 13.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
TiffPictureMBS.VTileSize(nrows as UInt32) as UInt64
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 13.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
TiffPictureMBS.WriteBW as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 5.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Uses the pictures in the pict property to write a picture.
Currently masks are not supported.
The following settings are made before the image data is written:
PlanarConfig = PLANARCONFIG_CONTIG
Photometric = PHOTOMETRIC_MINISBLACK
BitsPerSample = 1
SamplesPerPixel = 1
FillOrder = FILLORDER_MSB2LSB
VerticalResolution = 72
HorizontalResolution = 72
Orientation = ORIENTATION_TOPLEFT
ResolutionUnit = RESUNIT_INCH
Compression = COMPRESSION_NONE
You may change settings before or later. For example if you set Compression before it should be used for writing image data to the file.
Returns true on success.
This method uses the YieldTicks property and may yield time to other threads.
Some examples using this method:
TiffPictureMBS.WriteEncodedStrip(strip as UInt32, data as Memoryblock, size as Integer = 0) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 13.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Compress size bytes of raw data from buf and write the result to the specified strip; replacing any previously written data. Note that the value of strip is a ‘‘raw strip number.'' That is, the caller must take into account whether or not the data are organized in separate planes (PlanarConfiguration=2).
The library writes encoded data using the native machine byte order. Correctly implemented TIFF readers are expected to do any necessary byte-swapping to correctly process image data with BitsPerSample greater than 8.
The strip number must be valid according to the current settings of the ImageLength and RowsPerStrip tags. An image may be dynamically grown by increasing the value of ImageLength prior to each call to WriteEncodedStrip.
Returns −1 is returned if an error was encountered. Otherwise, the value of size is returned.
If size is zero, we use the size of memoryblock.
TiffPictureMBS.WriteEncodedTile(tile as UInt32, data as Memoryblock, size as Integer = 0) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 13.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Compress size bytes of raw data from buf and append the result to the end of the specified tile. Note that the value of tile is a "raw tile number". That is, the caller must take into account whether or not the data are organized in separate places (PlanarConfiguration=2). ComputeTile automatically does this when converting an (x,y,z,sample) coordinate quadruple to a tile number.
The library writes encoded data using the native machine byte order. Correctly implemented TIFF readers are expected to do any necessary byte-swapping to correctly process image data with BitsPerSample greater than 8.
Returns −1 is returned if an error was encountered. Otherwise, the value of size is returned.
If size is zero, we use the size of memoryblock.
TiffPictureMBS.WriteGray as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 7.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Uses the pictures in the pict property to write a picture.
Currently masks are not supported.
The following settings are made before the image data is written:
PlanarConfig = PLANARCONFIG_CONTIG
Photometric = PHOTOMETRIC_MINISBLACK
BitsPerSample = 8
SamplesPerPixel = 1
FillOrder = FILLORDER_MSB2LSB
VerticalResolution = 72
HorizontalResolution = 72
Orientation = ORIENTATION_TOPLEFT
ResolutionUnit = RESUNIT_INCH
Compression = COMPRESSION_NONE
You may change settings before or later. For example if you set Compression before it should be used for writing image data to the file.
Returns true on success.
This method uses the YieldTicks property and may yield time to other threads.
Version 13.1 of our plugins writes a 16 bit Gray image if you set BitsPerSample to 16 before calling this method.
Some examples using this method:
TiffPictureMBS.WriteRawStrip(strip as UInt32, data as Memoryblock, size as Integer = 0) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 13.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Append size bytes of raw data to the specified strip.
The strip number must be valid according to the current settings of the ImageLength and RowsPerStrip tags. An image may be dynamically grown by increasing the value of ImageLength prior to each call to WriteRawStrip.
Returns -1 is returned if an error occurred. Otherwise, the value of size is returned.
If size is zero, we use the size of memoryblock.
TiffPictureMBS.WriteRawTile(tile as UInt32, data as Memoryblock, size as Integer = 0) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 13.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Append size bytes of raw data to the specified tile.
Returns −1 is returned if an error occurred. Otherwise, the value of size is returned.
If size is zero, we use the size of memoryblock.
TiffPictureMBS.WriteRGB as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | TIFF | MBS Images Plugin | 4.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Uses the pictures in the mask and pict properties to write a picture.
If mask is set, the picture is saved with an alpha channel.
The following settings are made before the image data is written:
PlanarConfig = PLANARCONFIG_CONTIG
Photometric = PHOTOMETRIC_RGB
BitsPerSample = 8
SamplesPerPixel = 3
FillOrder = FILLORDER_MSB2LSB
VerticalResolution = 72
HorizontalResolution = 72
Orientation = ORIENTATION_TOPLEFT
ResolutionUnit = RESUNIT_INCH
Compression = COMPRESSION_NONE
You may change settings before or later. For example if you set Compression before it should be used for writing image data to the file.
Returns true on success.
This method uses the YieldTicks property and may yield time to other threads.
Some examples using this method:
The items on this page are in the following plugins: MBS Images Plugin.