Platforms to show: All Mac Windows Linux Cross-Platform

Back to TiffPictureMBS class.

Next items

TiffPictureMBS.BitsPerSample as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 3.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The count of bits for each pixel component.

Should normally by 8 for RGB images.
(Read and Write property)

TiffPictureMBS.BytesPerRow as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of bytes needed for each row in a scan line.

0 on any error.
(Read only property)

TiffPictureMBS.Compression as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The compression used.

some constants:
COMPRESSION_NONE1dump mode
COMPRESSION_CCITTRLE2CCITT modified Huffman RLE
COMPRESSION_CCITTFAX33CCITT Group 3 fax encoding
COMPRESSION_CCITT_T43CCITT T.4 (TIFF 6 name)
COMPRESSION_CCITTFAX44CCITT Group 4 fax encoding
COMPRESSION_CCITT_T64CCITT T.6 (TIFF 6 name)
COMPRESSION_LZW5Lempel-Ziv & Welch
COMPRESSION_OJPEG6!6.0 JPEG
COMPRESSION_JPEG7%JPEG DCT compression
COMPRESSION_NEXT32766NeXT 2-bit RLE
COMPRESSION_CCITTRLEW32771#1 w/ word alignment
COMPRESSION_PACKBITS32773Macintosh RLE
COMPRESSION_THUNDERSCAN32809ThunderScan RLE
COMPRESSION_IT8CTPAD32895IT8 CT w/padding
COMPRESSION_IT8LW32896IT8 Linework RLE
COMPRESSION_IT8MP32897IT8 Monochrome picture
COMPRESSION_IT8BL32898IT8 Binary line art
COMPRESSION_PIXARFILM32908Pixar companded 10bit LZW
COMPRESSION_PIXARLOG32909Pixar companded 11bit ZIP
COMPRESSION_DEFLATE32946Deflate compression
COMPRESSION_ADOBE_DEFLATE8Deflate compression, as recognized by Adobe
COMPRESSION_DCS32947Kodak DCS encoding
COMPRESSION_JBIG34661ISO JBIG
COMPRESSION_SGILOG34676SGI Log Luminance RLE
COMPRESSION_SGILOG2434677SGI Log 24-bit packed

The data for this property is stored in the Tiff file.
(Read and Write property)

TiffPictureMBS.Copyright as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The copyright notice of this image.
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

The data for this property is stored in the Tiff file.
(Read and Write property)

TiffPictureMBS.CurrentDirOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries current directory offset.

(Read only property)

TiffPictureMBS.CurrentRow as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Return the current row, respectively, that is being read or written.

These values are updated each time a read or write is done.
(Read only property)

TiffPictureMBS.CurrentStrip as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Return the current strip, respectively, that is being read or written.

These values are updated each time a read or write is done.
(Read only property)

TiffPictureMBS.CurrentTile as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Return the current tile, respectively, that is being read or written.

These values are updated each time a read or write is done.
(Read only property)

TiffPictureMBS.DateTime as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Date and time of the TIFF file.

Check some TIFF files for the format used.

The data for this property is stored in the Tiff file.
(Read and Write property)

TiffPictureMBS.DocumentName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The name of the document.

The data for this property is stored in the Tiff file.
(Read and Write property)

TiffPictureMBS.ExtraSamples as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The settings for the extra samples.

A memoryblock filled with an array of shorts (16bit integers).

constants:
EXTRASAMPLE_UNSPECIFIED0unspecified data
EXTRASAMPLE_ASSOCALPHA1associated alpha data (pre multiplied)
EXTRASAMPLE_UNASSALPHA2unassociated alpha data (mask in RB)

The data for this property is stored in the Tiff file.
(Read and Write property)

Some examples using this property:

TiffPictureMBS.FillOrder as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The fill order of the bits in a byte.

constants:
FILLORDER_MSB2LSB1 (default)
FILLORDER_LSB2MSB2
(MSB = Most significant bit, LSB = Least significant bit)

The data for this property is stored in the Tiff file.
(Read and Write property)

Some examples using this property:

TiffPictureMBS.height as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The height of the picture.

(Read and Write property)

TiffPictureMBS.HorizontalPosition as Single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The x Offset of this image in the drawing area.

The data for this property is stored in the Tiff file.
(Read and Write property)

Some examples using this property:

TiffPictureMBS.HorizontalResolution as Single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The horizontal resolution used.

Value depends on ResolutionUnit value.

The data for this property is stored in the Tiff file.
(Read and Write property)

TiffPictureMBS.HostComputer as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Name of the machine where the tiff file was created.

The data for this property is stored in the Tiff file.
(Read and Write property)

Some examples using this property:

TiffPictureMBS.ImageDescription as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Information about the image.

The data for this property is stored in the Tiff file.
(Read and Write property)

Some examples using this property:

TiffPictureMBS.InputBuffer as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The string passed for OpenString.

Used for the read requests from the Tiff library.
(Read only property)

TiffPictureMBS.IsBigEndian as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether file is big endian.

(Read only property)

TiffPictureMBS.IsByteSwapped as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether bytes are swapped.

Returns true if the image data was in a different byte-order than the host machine. Zero is returned if the TIFF file and local host byte-orders are the same.
Note that ReadTile(), ReadStrip() and ReadScanline() functions already normally perform byte swapping to local host order if needed.
(Read only property)

TiffPictureMBS.IsMSB2LSB as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if the image data is being returned with bit 0 as the most significant bit.

(Read only property)

TiffPictureMBS.IsTiled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a non-zero value if the image data has a tiled organization.

Zero is returned if the image data is organized in strips.
(Read only property)

Some examples using this property:

TiffPictureMBS.IsUpSampled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether data is upsampled.

Returns a non-zero value if image data returned through the read interface routines is being up-sampled. This can be useful to applications that want to calculate I/O buffer sizes to reflect this usage (though the usual strip and tile size routines already do this).
(Read only property)

TiffPictureMBS.JPEGQuality as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The JPEG quality.
Example
dim logo as Picture = LogoMBS(500)
dim pic as new PictureMBS(logo)

// save tiff with jpeg compression
dim f as FolderItem = SpecialFolder.Desktop.Child("test.tif")
dim t as TiffPictureMBS

if pic <> nil then
t = new TiffPictureMBS

if t.Create(F) then

t.Height = pic.Height
t.Width = pic.Width

t.RowsPerStrip = 1
t.PlanarConfig = t.kPlanarConfigContig
t.Photometric = t.kPhotometricRGB
t.BitsPerSample = 8
t.SamplesPerPixel = 3
t.FillOrder = t.kFillOrderMSB2LSB
t.Orientation = t.kOrientationTopLeft
t.ResolutionUnit = t.kResUnitInch
t.VerticalResolution = 72.0
t.HorizontalResolution = 72.0
t.Compression = t.kCompressionJPEG
t.RowsPerStrip = 32
t.JPEGQuality = 75

// copy lines
for i as Integer = 0 to t.Height - 1
t.Scanline(i) = pic.RowInFormat(i, PictureMBS.ImageFormatRGB)
next

t.Close
end if
end if

Default is 75.
(Read and Write property)

TiffPictureMBS.Make as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Scanner manufacturer name.

The data for this property is stored in the Tiff file.
(Read and Write property)

TiffPictureMBS.mask as picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The mask of the picture.

May be nil.
(Read and Write property)

TiffPictureMBS.Model as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Scanner model name/number.

The data for this property is stored in the Tiff file.
(Read and Write property)

TiffPictureMBS.NumberOfStrips as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the number of strips in the image.

(Read only property)

TiffPictureMBS.NumberOfTiles as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the number of tiles in the image.

(Read only property)

TiffPictureMBS.Orientation as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 3.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The orientation of this image.
Example
// creates a tif file with a horizontal flipped image
// red rectangle is on the left in the image data, but with orientation tag it should be displayed on the right side.
// Mac OS X Preview.app shows it correctly.

dim p as Picture
dim t as TiffPictureMBS
dim f as FolderItem

const ORIENTATION_TOPLEFT = 1 //* row 0 top, col 0 lhs */
const ORIENTATION_TOPRIGHT = 2 //* row 0 top, col 0 rhs */
const ORIENTATION_BOTRIGHT = 3 //* row 0 bottom, col 0 rhs */
const ORIENTATION_BOTLEFT = 4 //* row 0 bottom, col 0 lhs */
const ORIENTATION_LEFTTOP = 5 //* row 0 lhs, col 0 top */
const ORIENTATION_RIGHTTOP = 6 //* row 0 rhs, col 0 top */
const ORIENTATION_RIGHTBOT = 7 //* row 0 rhs, col 0 bottom */
const ORIENTATION_LEFTBOT = 8 //* row 0 lhs, col 0 bottom */

p=New Picture(150,100,32)

p.Graphics.ForeColor=rgb(255,0,0)
p.Graphics.FillRect 0,0,10,10

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

if t.Create(f) then
t.Pict=p

t.Orientation=ORIENTATION_TOPRIGHT
if t.WriteRGB then
end if
t.Orientation=ORIENTATION_TOPRIGHT

t.Close
end if

Orientation:

The orientation of the image with respect to the rows and columns.
Tag = 274 (112.H)
Type = SHORT
N = 1
1 = The 0th row represents the visual top of the image, and the 0th column represents the visual left-hand side.
2 = The 0th row represents the visual top of the image, and the 0th column represents the visual right-hand side.
3 = The 0th row represents the visual bottom of the image, and the 0th column represents the visual right-hand side.
4 = The 0th row represents the visual bottom of the image, and the 0th column represents the visual left-hand side.
5 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual top.
6 = The 0th row represents the visual right-hand side of the image, and the 0th column represents the visual top.
7 = The 0th row represents the visual right-hand side of the image, and the 0th column represents the visual bottom.
8 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual bottom.

Default is 1.
Support for orientations other than 1 is not a Baseline TIFF requirement.
(This text was sent in by David Austin)
(Read and Write property)

TiffPictureMBS.OutputBuffer as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The current output data from the CreateString function.

Between CreateString and Close the plugin will record all the output data and you can get a copy using this property.
(Read only property)

Some examples using this property:

TiffPictureMBS.PageName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The name of the current page.

The data for this property is stored in the Tiff file.
(Read and Write property)

Some examples using this property:

TiffPictureMBS.Photometric as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 3.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
A property of the TIFF image.
Example
// read and write a BW fax tiff with compression

dim d as new OpenDialog()
dim f as FolderItem = GetFolderItem("myfax.tiff")
if f = nil then
return
end if

dim tiff as new TiffPictureMBS()
if not tiff.Open(f) then
MsgBox("Error while opening.")
return
end if

if not tiff.ReadBW() then
MsgBox("Error reading.")
end if

dim tiff2 as TiffPictureMBS = new TiffPictureMBS()

dim f2 as FolderItem = SpecialFolder.Desktop.Child("Copy.tiff")
if not tiff2.Create(f2) then
MsgBox("Error creating file.")
end if

const COMPRESSION_CCITTFAX3=3
const WhiteIsZero=0
const BlackIsZero=1

tiff2.Pict = tiff.pict
tiff2.Photometric=WhiteIsZero
tiff2.Compression=COMPRESSION_CCITTFAX3
if not tiff2.WriteBW() then
MsgBox("Error writing.") // Error
end if

tiff2.Close()

PhotometricInterpretation:
The color space of the image data.
Tag = 262 (106.H)
Type = SHORT
N = 1

0 = WhiteIsZero. For bilevel and grayscale images: 0 is imaged as white. 2**BitsPerSample-1 is imaged as black. This is the normal value for Compression=2.

1 = BlackIsZero. For bilevel and grayscale images: 0 is imaged as black. 2**BitsPerSample-1 is imaged as white. If this value is specified for Compression=2, the image should display and print reversed.

2 = RGB. In the RGB model, a color is described as a combination of the three primary colors of light (red, green, and blue) in particular concentrations. For each of the three components, 0 represents minimum intensity, and 2**BitsPerSample - 1 represents maximum intensity. Thus an RGB value of (0,0,0) represents black, and (255,255,255) represents white, assuming 8-bit components. For PlanarConfiguration = 1, the components are stored in the indicated order: first Red, then Green, then Blue. For PlanarConfiguration = 2, the StripOffsets for the component planes are stored in the indicated order: first the Red component plane StripOffsets, then the Green plane StripOffsets, then the Blue plane StripOffsets.

3= Palette color. In this model, a color is described with a single component. The value of the component is used as an index into the red, green and blue curves in the ColorMap field to retrieve an RGB triplet that defines the color. When PhotometricInterpretation=3 is used, ColorMap must be present and SamplesPerPixel must be 1.

4 = Transparency Mask. This means that the image is used to define an irregularly shaped region of another image in the same TIFF file. SamplesPerPixel and BitsPerSample must be 1. PackBits compression is recommended. The 1-bits define the interior of the region; the 0-bits define the exterior of the region. A reader application can use the mask to determine which parts of the image to display. Main image pixels that correspond to 1-bits in the transparency mask are imaged to the screen or printer, but main image pixels that correspond to 0-bits in the mask are not displayed or printed. The image mask is typically at a higher resolution than the main image, if the main image is grayscale or color so that the edges can be sharp.

There is no default for PhotometricInterpretation, and it is required. Do not rely on applications defaulting to what you want.
(This text was sent in by David Austin)

For more details see:
http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf
(Read and Write property)

Some examples using this property:

TiffPictureMBS.pict as picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The picture data of the picture.

(Read and Write property)

TiffPictureMBS.PlanarConfig as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The storage organization used.

Value is 1 for a single image plane and 2 for separated planes.

The data for this property is stored in the Tiff file.
(Read and Write property)

Some examples using this property:

TiffPictureMBS.RasterScanlineSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property TIFF MBS Images Plugin 13.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the raster scanline size.

Returns the size in bytes of a complete decoded and packed raster scanline.
Note that this value may be different from the value returned by ScanlineSize if data is stored as separate planes.
(Read only property)

Next items

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


The biggest plugin in space...