Platforms to show: All Mac Windows Linux Cross-Platform

Back to TiffPictureMBS class.

Previous items Next items

TiffPictureMBS.GetFieldString(Tag as Integer, byref 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
Reads the value associated with the given tag id.
Example
dim t as TiffPictureMBS
dim f as FolderItem
dim s as string

f=SpecialFolder.Desktop.Child("test.tif")
t=f.OpenAsTiffMBS

const TIFFTAG_SOFTWARE=305

if t.GetFieldString(TIFFTAG_SOFTWARE, s) then
MsgBox "TIFFTAG_SOFTWARE"+EndOfLine+s
end if

const TIFFTAG_HOSTCOMPUTER=316

if t.GetFieldString(TIFFTAG_HOSTCOMPUTER, s) then
MsgBox "TIFFTAG_SOFTWARE"+EndOfLine+s
end if

const TIFFTAG_IMAGEDESCRIPTION=270

if t.GetFieldString(TIFFTAG_IMAGEDESCRIPTION, s) then
MsgBox "TIFFTAG_IMAGEDESCRIPTION"+EndOfLine+s
end if

const TIFFTAG_MAKE=271

if t.GetFieldString(TIFFTAG_MAKE, s) then
MsgBox "TIFFTAG_MAKE"+EndOfLine+s
end if

const TIFFTAG_ARTIST=315

if t.GetFieldString(TIFFTAG_ARTIST, s) then
MsgBox "TIFFTAG_ARTIST"+EndOfLine+s
end if

Please look for Tag values in the tiff specification.
Returns true on success. May return a default value.
Please make sure to use the correct setter depending on data type associated with the tag.
The string is returned with ascii encoding. You may need to define a different encoding is this is not correct.

Some examples using this method:

TiffPictureMBS.GetXMP as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 7.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the xmp metadata package stored in the tiff file.
Example
dim f as FolderItem
dim t as TiffPictureMBS
dim s as string

f=SpecialFolder.Desktop.Child("test.tif")

t=f.OpenAsTiffMBS

s=t.GetXMP

MsgBox left(s,500)

Returns "" on any error.

TiffPictureMBS.ImageCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 4.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the number of images in the TIFF file.

Returns 0 on any error.

TiffPictureMBS.ImageIndex as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 4.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The current image index.

0 based.

TiffPictureMBS.IsLastImage as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 4.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the current picture is the last picture.

Useful if you walk through all pictures using NextImage.

TiffPictureMBS.MirrorVertical(output as TiffPictureMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 7.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Mirrors the current picture to another tiff object.

You may be able to pass the current tiff file as the output one if you have it open for read and write.
Returns true on success and false on failure.
Works for any color depth or color mode.

TiffPictureMBS.NextImage as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 4.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads the next image in the TIFF file.

Returns true on success and false on any error.

See also:

TiffPictureMBS.NextImage(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
Reads the next image.

If HeaderOnly is false the current picture is read into the pict&mask properties.

See also:

TiffPictureMBS.Open(file as folderitem) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a tiff file for readonly access.

You need to use the ReadRGB method or the Scanline property to get data from this file.
Returns true on success.

See also:

TiffPictureMBS.Open(file as folderitem, Mode as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 5.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a tiff file for read/write access.
Example
dim file as folderitem = SpecialFolder.desktop.child("test.tif")
dim st as new MyTiff

// open for appending
if not st.Open(file,"r+") then
MsgBox "Open Tiff failed!"
else
// change one setting
st.Copyright = "Hello World"

// and save
call st.SaveImage
st.Close
end if

Same as the other Open method, but you can pass a mode string to the library.

The open mode parameter can include the following flags in addition to the "r" (Read), "w" (Write), and "a" (Append) flags. Note however that option flags must follow the read-write-append specification.

lWhen creating a new file force information be written with Little-Endian byte order (but see below). By default the library will create new files using the native CPU byte order.
bWhen creating a new file force information be written with Big-Endian byte order (but see below). By default the library will create new files using the native CPU byte order.
LForce image data that is read or written to be treated with bits filled from Least Significant Bit (LSB) to Most Significant Bit (MSB). Note that this is the opposite to the way the library has worked from its inception.
BForce image data that is read or written to be treated with bits filled from Most Significant Bit (MSB) to Least Significant Bit (LSB); this is the default.
HForce image data that is read or written to be treated with bits filled in the same order as the native CPU.
MEnable the use of memory-mapped files for images opened read-only. If the underlying system does not support memory-mapped files or if the specific image being opened cannot be memory-mapped then the library will fallback to using the normal system interface for reading information. By default the library will attempt to use memory-mapped files.
mDisable the use of memory-mapped files.
CEnable the use of "strip chopping" when reading images that are comprised of a single strip or tile of uncompressed data. Strip chopping is a mechanism by which the library will automatically convert the single-strip image to multiple strips, each of which has about 8 Kilobytes of data. This facility can be useful in reducing the amount of memory used to read an image because the library normally reads each strip in its entirety. Strip chopping does however alter the apparent contents of the image because when an image is divided into multiple strips it looks as though the underlying file contains multiple separate strips. Finally, note that default handling of strip chopping is a compile-time configuration parameter. The default behaviour, for backwards compatibility, is to enable strip chopping.
cDisable the use of strip chopping when reading images.

See also:

TiffPictureMBS.Open(Path as String, Mode as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 19.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a tiff file for read/write access.
Example
Dim t As New TiffPictureMBS

// try with path
Dim f As FolderItem = SpecialFolder.Desktop.Child("test.tif")
Dim p As String = f.NativePath

If t.Open(p, "r") Then

If t.ReadRGB Then

window1.Backdrop = t.Pict

End If
End If

Same as the other Open method, but you can pass a mode and path as string to the library.

The open mode parameter can include the following flags in addition to the "r" (Read), "w" (Write), and "a" (Append) flags. Note however that option flags must follow the read-write-append specification.

lWhen creating a new file force information be written with Little-Endian byte order (but see below). By default the library will create new files using the native CPU byte order.
bWhen creating a new file force information be written with Big-Endian byte order (but see below). By default the library will create new files using the native CPU byte order.
LForce image data that is read or written to be treated with bits filled from Least Significant Bit (LSB) to Most Significant Bit (MSB). Note that this is the opposite to the way the library has worked from its inception.
BForce image data that is read or written to be treated with bits filled from Most Significant Bit (MSB) to Least Significant Bit (LSB); this is the default.
HForce image data that is read or written to be treated with bits filled in the same order as the native CPU.
MEnable the use of memory-mapped files for images opened read-only. If the underlying system does not support memory-mapped files or if the specific image being opened cannot be memory-mapped then the library will fallback to using the normal system interface for reading information. By default the library will attempt to use memory-mapped files.
mDisable the use of memory-mapped files.
CEnable the use of "strip chopping" when reading images that are comprised of a single strip or tile of uncompressed data. Strip chopping is a mechanism by which the library will automatically convert the single-strip image to multiple strips, each of which has about 8 Kilobytes of data. This facility can be useful in reducing the amount of memory used to read an image because the library normally reads each strip in its entirety. Strip chopping does however alter the apparent contents of the image because when an image is divided into multiple strips it looks as though the underlying file contains multiple separate strips. Finally, note that default handling of strip chopping is a compile-time configuration parameter. The default behaviour, for backwards compatibility, is to enable strip chopping.
cDisable the use of strip chopping when reading images.

See also:

TiffPictureMBS.OpenString(data as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a tiff image located in a binary string.
Example
Function TiffStringToPicture(data as string) As picture
dim t as MyTiffPictureMBS

t=new MyTiffPictureMBS

if t.OpenString(data) then
if t.ReadRGB then
return t.Pict
// you could add the mask here.
end if
end if

Return nil // failed
End Function

Same as the Open() function, but memory based. You can now use functions like Scanline(), ReadSW() or ReadRGB() to get the picture data.

Returns true on success.
The Warning and Error events may show you reasons why it does not work.
The string you pass is saved in the data property of the class for later use.

You can and should use this function to write yourself a TiffStringToPicture function.

See also:

TiffPictureMBS.OpenString(data as string, Mode as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 5.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a tiff image located in a binary string.

Same as the other OpenString method, but you can pass a mode string to the library.

See also:

TiffPictureMBS.RawStripSize(strip 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
Returns the number of bytes in a raw strip (i.e. not decoded).

TiffPictureMBS.ReadBW as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 4.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the current picture in BW mode.
Example
dim f as FolderItem
dim p as Picture
dim t as TiffPictureMBS

f=SpecialFolder.Desktop.Child("Multipage fax.tif")
t=f.OpenAsTiffMBS(true)

if t.ReadBW then
title=str(t.ImageCount)

p=t.pict
Title=str(p.Depth)
Canvas1.Backdrop=p
end if

Returns true on success and false on any error.
Only if the current picture is a 1bit black&white picture, a new picture is created in the pict property and the data is copied inside.

Data in the TIFF file must be in 1 bit BW mode. Else use ReadRGB which does a lot of converting.

This method uses the YieldTicks property and may yield time to other threads.

See also:

Some examples using this method:

TiffPictureMBS.ReadBW(left as Integer, top as Integer, width as Integer, height as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the current picture in BW mode.
Example
dim f as FolderItem
dim p as Picture
dim t as TiffPictureMBS

f=SpecialFolder.Desktop.Child("Multipage fax.tif")
t=f.OpenAsTiffMBS(true)

if t.ReadBW(0,0,t.width/2,t.height/2) then
title=str(t.ImageCount)

p=t.pict
Title=str(p.Depth)
Canvas1.Backdrop=p
end if

Returns true on success and false on any error.
Only if the current picture is a 1bit black&white picture, a new picture is created in the pict property and the data is copied inside.

Data in the TIFF file must be in 1 bit BW mode. Else use ReadRGB which does a lot of converting.

This method uses the YieldTicks property and may yield time to other threads.

See also:

TiffPictureMBS.ReadEncodedStrip(strip as UInt32, byref data as Memoryblock) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Read and decode a strip of data from an open TIFF file.

Read the specified strip of data and place up to size bytes of decompressed information in the (user supplied) data buffer.

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). To read a full strip of data the data buffer should typically be at least as large as the number returned by StripSize.
The library attempts to hide bit- and byte-ordering differences between the image and the native machine by converting data to the native machine order. Bit reversal is done if the FillOrder tag is opposite to the native machine bit order. 16- and 32-bit samples are automatically byte-swapped if the file was written with a byte order opposite to the native machine byte order,

Returns the actual number of bytes of data that were placed in buf is returned; ReadEncodedStrip returns -1 if an error was encountered.

TiffPictureMBS.ReadEncodedTile(tile as UInt32, byref data as Memoryblock) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Read and decode a tile of data from an open TIFF file.

Read the specified tile of data and place up to size bytes of decompressed information in the (user supplied) data buffer.

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 planes (PlanarConfiguration=2). ComputeTile automatically does this when converting an (x,y,z,sample) coordinate quadruple to a tile number. To read a full tile of data the data buffer should be at least as large as the value returned by TileSize.

The library attempts to hide bit- and byte-ordering differences between the image and the native machine by converting data to the native machine order. Bit reversal is done if the FillOrder tag is opposite to the native machine bit order. 16- and 32-bit samples are automatically byte-swapped if the file was written with a byte order opposite to the native machine byte order,

Returns the actual number of bytes of data that were placed in buf is returned; ReadEncodedTile returns −1 if an error was encountered.

TiffPictureMBS.ReadPreviewBW as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the current picture in BW mode as a preview.

This method is faster than ReadBW, because it reads only every 8th line and every 8th pixel in each row. So the picture you get is much smaller, but may be enough for a preview.

Returns true on success and false on any error.
Only if the current picture is a 1bit black&white picture, a new picture is created in the pict property and the data is copied inside.

Data in the TIFF file must be in 1 bit BW mode. Else use ReadRGB which does a lot of converting.

This method uses the YieldTicks property and may yield time to other threads.

See also:

Some examples using this method:

TiffPictureMBS.ReadPreviewBW(left as Integer, top as Integer, width as Integer, height as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the current picture in BW mode as a preview.

This method is faster than ReadBW, because it reads only every 8th line and every 8th pixel in each row. So the picture you get is much smaller, but may be enough for a preview.

Returns true on success and false on any error.
Only if the current picture is a 1bit black&white picture, a new picture is created in the pict property and the data is copied inside.

Data in the TIFF file must be in 1 bit BW mode. Else use ReadRGB which does a lot of converting.

This method uses the YieldTicks property and may yield time to other threads.

See also:

TiffPictureMBS.ReadPreviewRGB(ReduceFactor as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a CMYK or RGB picture and stores it in the pict and name properties.

This method is faster than ReadRGB, because it reads only every ReduceFactorth line and every ReduceFactorth pixel in each row. So the picture you get is much smaller, but may be enough for a preview.

Returns true on success.
ReadRGB does converting on the picture data if needed so you can read CMYK, RGB, BW and other image data using this function.

This function works with most Tiff formats, but has problems with some like 16 bit CMYK.

Some examples using this method:

TiffPictureMBS.ReadRawStrip(strip as UInt32, byref data as Memoryblock) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Return the undecoded contents of a strip of data from an open TIFF file.

Read the contents of the specified strip into the (user supplied) data buffer. Note that the value of strip is a "raw strip number". That is, the caller must take into account whether or not the data is organized in separate planes (PlanarConfiguration=2). To read a full strip of data the data buffer should typically be at least as large as the number returned by StripSize.

Returns the actual number of bytes of data that were placed in buf is returned; ReadEncodedStrip returns -1 if an error was encountered.

TiffPictureMBS.ReadRawTile(tile as UInt32, byref data as Memoryblock) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Return an undecoded tile of data from an open TIFF file.


Read the contents of the specified tile into the (user supplied) data buffer. Note that the value of tile is a "raw tile number". That is, the caller must take into account whether or not the data is organized in separate planes (PlanarConfiguration=2). ComputeTile automatically does this when converting an (x,y,z,sample) coordinate quadruple to a tile number. To read a full tile of data the data buffer should typically be at least as large as the value returned by TileSize.

Returns the actual number of bytes of data that were placed in buf is returned; ReadEncodedTile returns −1 if an error was encountered.

TiffPictureMBS.ReadRGB as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a CMYK or RGB picture and stores it in the pict and name properties.

Returns true on success.
ReadRGB does converting on the picture data if needed so you can read CMYK, RGB, BW and other image data using this function.

This function works with most Tiff formats, but has problems with some like 16 bit CMYK.

See also:

Some examples using this method:

TiffPictureMBS.ReadRGB(byref ErrorMessage as string, Dest as MemoryBlock = nil) as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 9.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the image into a memoryblock as RGB.

The Scanline() array gives you the raw uncompressed data. But this method decodes the data into a RGBA image.

The Memoryblock has the size of 4*width*height. Each pixel has one byte for red, one byte for green, one byte for blue and one byte for alpha. If no alpha is in the file, all pixels have the same alpha of 255.

If the decompression fails the function returns nil. (e.g. out of memory).
If the decoding fails, you also get an error message.

This function works with most Tiff formats, but has problems with some like 16 bit CMYK.

If dest is not nil and big enough, the plugin will use it and return it on success. This can avoid additional memory allocations which can cost CPU time (especially to clear the bytes).

See also:

TiffPictureMBS.ReadRGBMemoryBegin(byref ErrorMessage as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 10.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Starts a RGBA reader for the given TIFF picture.

Like ReadRGB, but with ReadRGBMemoryBegin, ReadRGBMemoryEnd and ReadRGBMemoryStep you can read the RGBA data in portions.

The Memoryblock returned by ReadRGBMemoryStep has the size of 4*width*height. Each pixel has one byte for red, one byte for green, one byte for blue and one byte for alpha. If no alpha is in the file, all pixels have the same alpha of 255.

If the decompression fails the function returns false. (e.g. out of memory).
If the decoding fails, you also get an error message.

This function works with most Tiff formats, but has problems with some like 16 bit CMYK.

TiffPictureMBS.ReadRGBMemoryEnd

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 10.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Cleans up the internal data structures created by ReadRGBMemoryBegin.

TiffPictureMBS.ReadRGBMemoryStep(x as Integer, y as Integer, width as Integer, height as Integer, Dest as MemoryBlock = nil) as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 10.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the image into a memoryblock as RGBA.
Example
dim t as new TiffPictureMBS
dim f as FolderItem = SpecialFolder.Desktop.Child("test.tif")
dim e as string

if t.Open(f) then
if t.ReadRGBMemoryBegin(e) then

dim w as Integer = t.Width
dim h as Integer = t.Height

dim p as new PictureMBS(w, h, PictureMBS.ImageFormatRGB)

for y as Integer = 0 to h-1 step 100

dim m as MemoryBlock = t.ReadRGBMemoryStep(0, y, w, 100)

for i as Integer = 0 to 99
p.RowInFormat(i+y, PictureMBS.ImageFormatRGBA)=m
next

next

t.ReadRGBMemoryEnd
Backdrop = p.copypicture(0,0,1000,1000) // display a portion
end if

end if

As you see in the example, you can use this method to easily read huge TIFF files into a PictureMBS object.

If the decompression fails the function returns nil. (e.g. out of memory).
Please make sure that the range in x and y, width and height is right.

If dest is not nil and big enough, the plugin will use it and return it on success. This can avoid additional memory allocations which can cost CPU time (especially to clear the bytes).

TiffPictureMBS.ReadWithLUT(ColorLookupTable() as color) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 9.8 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the current picture with a Color Lookup Table.

Returns true on success and false on any error.
Works with 8, 16 amd 32 bits per sample. And with 1 or 3 samples per pixels (Gray or RGB). The lookup table has 256 entries for 8 bit and 65536 entries for 16/32 bit.
This method uses the YieldTicks property and may yield time to other threads.

See also:

Some examples using this method:

TiffPictureMBS.ReadWithLUT(ColorLookupTable() as color, left as Integer, top as Integer, width as Integer, height as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 9.8 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the current picture with a Color Lookup Table.

Returns true on success and false on any error.
Works with 8, 16 amd 32 bits per sample. And with 1 or 3 samples per pixels (Gray or RGB). The lookup table has 256 entries for 8 bit and 65536 entries for 16/32 bit.
This method uses the YieldTicks property and may yield time to other threads.

See also:

TiffPictureMBS.RewriteDirectory as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes existing picture and header information to file replacing the old data.

Returns true on success and false on any error.
As the data is added to the file and just the reference to the old data is deleted, the filesize will grow.

Calls TIFFReWriteDirectory internally. Same as SaveImage.

Some examples using this method:

TiffPictureMBS.SaveImage as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes existing picture and header information to file replacing the old data.

Returns true on success and false on any error.
As the data is added to the file and just the reference to the old data is deleted, the filesize will grow.

Calls TIFFReWriteDirectory internally. Same as RewriteDirectory.

TiffPictureMBS.Scanline(index as Integer, sample as Integer = 0) as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
An image scanline.

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.
(Read and Write computed property)

See also:

Some examples using this property:

TiffPictureMBS.Scanline(mem as Ptr, index as Integer, sample as Integer = 0) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method TIFF MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads an image scanline in a memoryblock.

Returns false on any error.
Thee Memoryblock must be big enough. The BytesPerRow functions returns the number of bytes needed.
The first scanline has the index of 0.
This is the fastest way to read scanlines. You provide the memoryblock and you can reuse it for all calls to this method for one tiff.

See also:

Previous items Next items

The items on this page are in the following plugins: MBS Images Plugin.


The biggest plugin in space...