Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

TiffPictureMBS.Orientation as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 3.1 Yes Yes Yes Yes No
Function: 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=NewPicture(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
Notes:
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)

Feedback, Comments & Corrections

TiffPictureMBS.OutputBuffer as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 5.2 Yes Yes Yes Yes No
Function: The current output data from the CreateString function.
Notes:
Between CreateString and Close the plugin will record all the output data and you can get a copy using this property.
(Read only property)

Feedback, Comments & Corrections

TiffPictureMBS.PageName as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 4.2 Yes Yes Yes Yes No
Function: The name of the current page.
Notes:
The data for this property is stored in the Tiff file.
(Read and Write property)

Feedback, Comments & Corrections

TiffPictureMBS.Photometric as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 3.1 Yes Yes Yes Yes No
Function: 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()
Notes:
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)

Feedback, Comments & Corrections

TiffPictureMBS.pict as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin Yes Yes Yes Yes No
Function: The picture data of the picture.
Notes: (Read and Write property)

Feedback, Comments & Corrections

TiffPictureMBS.PlanarConfig as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 4.2 Yes Yes Yes Yes No
Function: The storage organization used.
Notes:
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)

Feedback, Comments & Corrections

TiffPictureMBS.RasterScanlineSize as UInt64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 13.5 Yes Yes Yes Yes No
Function: Returns the raster scanline size.
Notes:
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)

Feedback, Comments & Corrections

TiffPictureMBS.ResolutionUnit as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 4.2 Yes Yes Yes Yes No
Function: Which unit is used for the Resolution values.
Notes:
constants:
RESUNIT_NONE1no meaningful units
RESUNIT_INCH2english
RESUNIT_CENTIMETER3metric

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

Feedback, Comments & Corrections

TiffPictureMBS.RowsPerStrip as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 4.3 Yes Yes Yes Yes No
Function: A property of the TIFF image.
Notes:
Should be same as the height for our uses. (with one strip)
(Read and Write property)

Feedback, Comments & Corrections

TiffPictureMBS.SampleFormat as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 15.0 Yes Yes Yes Yes No
Function: The data sample format.
Notes:
Value is 1 for unsigned integer, 2 for signed integer, 3 for IEEE floating point, 4 for untyped data (e.g. JPEG compressed), 5 for complex signed int and 6 for complex IEEE floating point.
(Read and Write property)

Feedback, Comments & Corrections

TiffPictureMBS.SamplesPerPixel as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 3.1 Yes Yes Yes Yes No
Function: The count of components used for each pixel.
Notes:
SamplesPerPixel= 1=Grayscale, 3=RGB, 4=CMYK, ...
Photometric= 0 or 1=Grayscale depending on white point, 2=RGB, 5=CMYK, ...

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

Feedback, Comments & Corrections

TiffPictureMBS.Software as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 4.2 Yes Yes Yes Yes No
Function: The software name used to make this image.
Notes:
The data for this property is stored in the Tiff file.
(Read and Write property)

Feedback, Comments & Corrections

TiffPictureMBS.StripSize as UInt64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 13.5 Yes Yes Yes Yes No
Function: Returns the equivalent size for a strip of data as it would be returned in a call to ReadEncodedStrip or as it would be expected in a call to WriteEncodedStrip.
Notes: (Read only property)

Feedback, Comments & Corrections

TiffPictureMBS.TileRowSize as UInt64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 13.5 Yes Yes Yes Yes No
Function: Returns the number of bytes of a row of data in a tile.
Notes: (Read only property)

Feedback, Comments & Corrections

TiffPictureMBS.TileSize as UInt64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 13.5 Yes Yes Yes Yes No
Function: Returns the equivalent size for a tile of data as it would be returned in a call to ReadTile or as it would be expected in a call to WriteTile.
Notes: (Read only property)

Feedback, Comments & Corrections

TiffPictureMBS.Version as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 5.0 Yes Yes Yes Yes No
Function: The version of the Tiff library used.
Notes:
Updated to 3.7.1 in plugin version 5.0.
(Read only property)

Feedback, Comments & Corrections

TiffPictureMBS.VersionString as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 5.0 Yes Yes Yes Yes No
Function: The version of the Tiff library used.
Example:
dim z as new TiffPictureMBS

MsgBox z.VersionString

// shows for example:
// LIBTIFF, Version 3.9.4
// Copyright (c) 1988-1996 Sam Leffler
// Copyright (c) 1991-1996 Silicon Graphics, Inc.
Notes: (Read only property)

Feedback, Comments & Corrections

TiffPictureMBS.VerticalPosition as Single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 4.2 Yes Yes Yes Yes No
Function: The y Offset of this image in the drawing area.
Notes:
The data for this property is stored in the Tiff file.
(Read and Write property)

Feedback, Comments & Corrections

TiffPictureMBS.VerticalResolution as Single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 4.2 Yes Yes Yes Yes No
Function: The vertical resolution used.
Notes:
Value depends on ResolutionUnit value.

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

Feedback, Comments & Corrections

TiffPictureMBS.width as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin Yes Yes Yes Yes No
Function: The width of the picture.
Notes: (Read and Write property)

Feedback, Comments & Corrections

TiffPictureMBS.YieldTicks as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property TIFF MBS Images Plugin 7.3 Yes Yes Yes Yes No
Function: How much time is given back to REALbasic for other ticks.
Example:
dim t as new TiffPictureMBS
t.YieldTicks=6 // only use 1/10th of a second
Notes:
If value is greater than zero, the application will yield to another RB thread after the given number of ticks have passed. 60 ticks are one second. Using a small value can slow down processing a lot while a big value keeps your application not responding to mouse clicks.
If you use this property with e.g. 6 as the value, you may also want to use this method in a thread so you can handle mouse events or let REALbasic redraw a progressbar.
(Read and Write property)

Feedback, Comments & Corrections

Previous items

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





Links
MBS Xojo Chart Plugins