You are on page 1of 54

History Version : GFL SDK/GflAX v2.

66
Copyright (c) : 1991-2007 Pierre-E Gougelet. All Rights Reserved.

GflAX v2.00 (LIBFORMAT v4.11) 17/10/2003:

Interface rewrited (component without display methods)

License

Installing and using this library (GFL SDK/GflAx) signifies acceptance of these
terms and conditions of the license.

"GFL SDK/GFLAx" is provided as Freeware for private non-commercial or educationa


l use (including non-profit organization).
You must contact me for commercial use and distribution. webmaster@xnview.com

You may not use GFL SDK or GflAx to create components or controls to be used by
other developers without written approval.

The product developed by the Licensee should not be similar to or should not com
pete with XnView/NConvert (should not be a graphic viewer or converter).

"GFL SDK/GFLAx" IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE OR RESALE AS O


NLINE CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE PERFORMANC
E, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUN
ICATIONS SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS
SYSTEMS, IN WHICH THE FAILURE OF "GFL SDK/GFLAx" COULD LEAD DIRECTLY TO DEATH, P
ERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE.

"GFL SDK/GFLAx" is provided "as-is" and without warranty of any kind, express, i
mplied or otherwise, including without limitation, any warranty of merchantabili
ty or fitness for a particular purpose.

In no event shall the author of this software be held liable for data loss, dama
ges, loss of profits or any other kind of loss while using or misusing this soft
ware.

You may not use, copy, emulate, clone, rent, lease, sell, modify, decompile, dis
assemble, otherwise reverse engineer, or transfer the licensed program, or any s
ubset of the licensed program, except as provided for in this agreement. Any suc
h unauthorized use shall result in immediate and automatic termination of this l
icense and may result in criminal and/or civil prosecution.

Important The use of LZW technology needs to be licensed separately from UNISYS
Corporation. Contact UNISYS to get this license (www.unisys.com).
For JPEG-2000 & JBIG use, see corresponding licenses in Plugins folder of the GF
L SDK package

Any suggestions, feedback and comments are welcome.

About Installation of the component To use GflAx DLL, copy the component in your
windows system directory, and register it with the regsvr32 command !

Use with Visual Basic To implement GflAx DLL in Visual Basic once the DLL instal
led, select the reference named GflAx in the IDE.
Creation of a object instance

Dim MyObj As GflAx.GflAx

Set MyObj = New GflAx.GflAx

To freeing this object, set it to Nothing :


Set MyOb
j = Nothing

Use with ASP To implement GflAx DLL with ASP, you must declare an instance of th
e object.
Creation of an object instance

Dim MyObj

Set MyObj = Server.CreateObject("GflAx.GflAx")


For freeing this object, set it to nothing :
Set MyOb
j = Nothing

Particularity of the object under ASP 1. The constants are not implemented. AX_G
IF and others return 0.
2. The getPicture function is of use to nothing with the instructions of VBScrip
t or JScript. There is no object with the Picture property under ASP.

About

This property (read only) returns the control and library versions.

object.About [=string]

Language

Allows to set the language for the error messages.

object.Language [=AX_Language]

Parameters AX_Language
A AX_Language constant:
1 AX_English 0 (by default)
2 AX_Francais 1

EnableLZW

Enables or disables the use of LZW compression.

object.EnableLZW [=boolean]

Remarks
r patent of Unisys.

Be carefull ! The use of LZW compression is unde


By default, this is disabled.

See also LoadBitmap,


ry

SetPluginsPathname
older.

SaveBitmap,

SendBina

Returns ou defines the pathname of a GFL Lib's Plugins f

object.SetPluginsPathname [=string]

UseTransparency
.

Returns or sets if the transparency of a picture is used

object.UseTransparency [=Boolean]

See also MaskColor,


re

MaskColor

BackColor,

Returns or sets the transparency color.

object.MaskColor [=OLE_COLOR]

See also UseTransparency,


GetPicture

BackColor,

GetPictu

BackColor
picture.

Returns or sets the background color used to display transparent

object.BackColor [=OLE_COLOR]

See also UseTransparency,


GetPicture

BitmapType

MaskColor,

This property returns the color mode of the picture.

object.BitmapType [=AX_Type]

Parameters AX_Type
A AX_Type constant:
1 AX_Binary Binary
2 AX_Grey Grey scale
3 AX_Colors Colors
4 AX_TrueColors True colors

See also BitmapType,


Ydpi,
NumberOfImages

Width,
Xdpi,

Height,
NumberOfColorsUsed,

ColorModel
This property (read only) returns the label for the color mode o
f the picture.

object.ColorModel [=string]

Width

This property (read only) returns the width in pixels of the picture.

object.Width [=long]

Height This property (read only) returns the height in pixels of the picture.

object.Height [=long]

Xdpi

Returns or sets the resolution of the X axis in DPI (Dot Per Inch).

object.Xdpi [=integer]

Ydpi

Returns or sets the resolution of the Y axis in DPI (Dot Per Inch).

object.Ydpi [=integer]

NumberOfImages This property (read only) returns the number of picture in the f
ile.

object.NumberOfImages [=long]

NumberOfPages

Property in read only to gets the number of pages of a file.

object.NumberOfPages [=long]

Page

Property in read only to get the current page loaded.

object.Page [=long]

OriginalSize
in bytes.

This property (read only) returns the size of the original file

object.OriginalSize [=long]

NumberOfColorsUsed
olors in the picture.

Property (read only) that returns the number of unique c

object.NumberOfColorsUsed [=long]

EpsDpi Allows to set the dpi used for loading eps/ps file.

object.EpsDpi [=long]

EpsWidth

Allows to set the width used for loading eps/ps file.

object.EpsWidth [=long]

EpsHeight

Allows to set the height used for loading eps/ps file.

object.EpsHeight [=long]

UseDPIFromEXIF Property (read only) that allows to use DPI from EXIF insteed DP
I from JPEG header.

object.UseDPIFromEXIF [=boolean]

SaveFormat

Returns or sets the format for the saving.

object.SaveFormat [=AX_FileFormats]

Parameters AX_FileFormats
A AX_SaveFormats constant:
1 AX_JPEG
2 AX_GIF
3 AX_PNG
4 AX_BMP
5 AX_TIFF
6 AX_TGA
7 AX_PCX
8 AX_XPM
9 AX_IFF
10 AX_SOFT
11 AX_SGI
12 AX_DCX
13 AX_PBM
14 AX_PGM
15 AX_PPM
16 AX_PNM

18 AX_XBM
19 AX_ICO
20 AX_PSION3
21 AX_PSION5
22 AX_PALM
23 AX_EMF
24 AX_VISTA
25 AX_ALIAS
26 AX_RLA
27 AX_CIN
28 AX_HRU
29 AX_DKB
30 AX_QRT
31 AX_VIVID
32 AX_MTV
33 AX_RAY
34 AX_JIF
35 AX_GPAT
39 AX_BIORAD
40 AX_RAD
42 AX_PRC
43 AX_WRL
45 AX_WBMP
47 AX_UYVYI
48 AX_UYVY
49 AX_RAW

Remarks
Be carefull ! Some file formats as GIF requires
the use of LZW compression under a patent from Unisys.
By defau
lt, the LZW compression is disabled.

See also SaveBitmap,


SaveFormatDescription

SaveFormatName,

SaveFormatName Sets the format for the saving.

object.SaveFormatName [=string]

Parameters
See table for light version or standard version for supp
orted formats and name.

Remarks
Be carefull ! Some file formats as GIF requires
the use of LZW compression under a patent from Unisys.
By defau
lt, the LZW compression is disabled.

See also SaveBitmap,


atDescription

SaveGIFInterlaced
format.

SaveFormat,

SaveForm

Returns or sets the interlaced mode for a picture in GIF

object.SaveGIFInterlaced [=boolean]

SaveJPEGProgressive
G format.

Returns or sets the progressive mode of a picture in JPE

object.SaveJPEGProgressive [=boolean]

See also SaveJPEGQuality,

SaveKeepMetadata

SaveJPEGQuality
JPEG format.

Returns or sets the quality of a picture (in percent) in

object.SaveJPEGQuality [=integer]

Parameters integer
An integer between 0 and 100

See also SaveJPEGProgressive,

SavePNGCompression
NG format.

SaveKeepMetadata

Returns or sets the compression level for a picture in P

object.SavePNGCompression [=integer]

Parameters integer
An integer between 1 and 7

SaveFormatDescription
format used to save.

Property (read only) that returns the description of the

object.SaveFormatDescription [=string]

SaveKeepMetadata

Allows to keep metadata for saving.

object.SaveKeepMetadata [=boolean]

See also SaveJPEGQuality,

SaveJPEGProgressive

FontName
Returns or sets the name of the font used by the TextOut functio
n to draw text.

object.FontName [=string]

Remarks
ing system.

FontName is a font name installed on your operat

See also Bold,

FontItalic,
FontSize,

FontOrientation,
FontUnderline,

TextOut

FontSize
Returns or sets the size of the font used by the TextOut functio
n to draw text.

object.FontSize [=long]

See also Bold,


FontOrientation,

FontBold
tion.

FontItalic,
FontUnderline,

FontName,
TextOut

Specifies that the font is an bold font used by the TextOut func

object.FontBold [=boolean]

See also FontItalic,

FontName,

FontOrie

ntation,
FontStrikeOut,

FontItalic
nction.

FontSize,
TextOut

FontUnderline,

Specifies that the font is an italic font used by the TextOut fu

object.FontItalic [=boolean]

See also Bold,


FontStrikeOut,

FontOrientation
o draw the text.

FontName,
FontSize,
TextOut

FontOrientation,
FontUnderline,

Returns or sets the angle used by the TextOut function t

object.FontOrientation [=long]

Remarks

Angle in degrees.

See also Bold,


FontSize,
TextOut

FontStrikeOut
function.

FontItalic,
FontUnderline,

FontName,
FontStrikeOut,

Specifies that the font is an strikeout font used by the TextOut

object.FontStrikeOut [=boolean]

See also Bold,


FontOrientation,
rline,

FontItalic,
FontSize,
TextOut

FontName,
FontUnde

FontUnderline
t function.

Specifies that the font is an underlined font used by the TextOu

object.FontUnderline [=boolean]

See also Bold,


FontOrientation,
keOut,

LineWidth

FontItalic,
FontSize,

FontName,
FontStri

TextOut

Returns or sets the width for line drawing functions.

object.LineWidth [=long]

See also LineWidth,


r,
DrawRectangle,
le,
DrawPolygon

LineColor

LineColor,
DrawPoint,
DrawFillRectangle,
DrawFillCircle,

FillColo
DrawLine,
DrawCirc
DrawPolyline,

Returns or sets the color for line drawing functions.

object.LineColor [=OLE_COLOR]

See also LineWidth,


t,
DrawFillRectangle,
Circle,

FillColor

FillColor,
DrawLine,
DrawCircle,
DrawPolyline,

DrawPoin
DrawRectangle,
DrawFill
DrawPolygon

Returns or sets the fill color for line drawing functions.

object.FillColor [=OLE_COLOR]

See also LineWidth,


r,
DrawPolygon

LoadBitmap

LineColor,
DrawFillRectangle,

FillColo
DrawFillCircle,

Loads a picture in a GflAx object.

object.LoadBitmap(File as string)

Parameters File
String that contains the filename (with or not the folder and/or drive).
By default, the installed folder of the control is used.

Remarks
Be carefull ! Some file formats as GIF requires
the use of LZW compression under a patent from Unisys.
By defau
lt, the LZW compression is disabled.

See also LoadThumbnail,


SendBinary,

LoadThumbnail

SaveBitmap,
GetPicture,

EnableLZW

Loads a thumbnail of a picture in a GflAx object.

object.LoadThumbnail(File as string,Width as long, Height as long)

Parameters File
String that contains the filename (with or not the folder and/or drive).
By default, the installed folder of the control is used.
Width

Width of the thumbnail.


Height
Height of the thumbnail.

Remarks
Be carefull ! Some file formats as GIF requires
the use of LZW compression under a patent from Unisys.
By defau
lt, the LZW compression is disabled.

See also LoadBitmap,


ry,

SaveBitmap

SaveBitmap,
GetPicture,

SendBina
EnableLZW

Saves the loaded picture in a GflAx object, in a file.

object.SaveBitmap([File as string])

Parameters File
(optional) String that contains the filename (with or not the folder and/or driv
e).
By default, the installed folder of the control
is used.

Remarks 1. If there is no filename, GflAx will use the filename in the object. I
f a file has the same extension or exists already, it will be replaced by SaveBi
tmap.
2. Be carefull ! Some file formats as GIF requires the use of LZW compression un
der a patent from Unisys.
By default, the LZW compression
is disabled.

See also SaveFormat,


SaveJPEGProgressive,

SaveGIFInterlaced,
SaveJPEGQuality,

SavePNGCompression,
bnail,
EnableLZW

Clone

LoadBitmap,
SendBinary,

LoadThum
GetPicture,

Clone a GflAx object in another GflAx object.

object.Clone [=GflAx]

NewBitmap

Allows to create a new picture.

object.NewBitmap(Width As Long, Height As Long, [BackColor As OLE_COLOR])

Parameters Width
Width of the picture in pixels.
Height
Height of the picture in pixels.
BackColor (optional)
Value (long or constant) for the background color.

GetPicture
The GetPicture function loads a picture in the Picture p
roperties, of a PictureBox control, Image control or all other container that's
supports a picture object.

object.GetPicture [=IPicture]

See also UseTransparency,


BackColor,
SaveFile

MaskColor,
SendBinary,

LoadPicture,

ExportToClipboard
rent picture to clipboard.

The ExportToClipboard function allows export cur

object.ExportToClipboard

ChangeColorDepth

Changes the color mode of a picture.

object.ChangeColorDepth([Mode as AX_Mode],[Dither as AX_Dither],[Palette as AX_P


alette])

Parameters Mode
(optional) A AX_Mode.

1 AX_ToBinary Binary

4 AX_To4Colors 4 Colors
8 AX_To8Colors 8 Colors
16 AX_To16Colors 16 Colors
32 AX_To32Colors 32 Colors
64 AX_To64Colors 64 Colors
128 AX_To128Colors 128 Colors
216 AX_To216Colors 216 Colors
256 AX_To256Colors 256 Colors
0 (default) AX_ToTrueColors True colors

Dither
(optional) A AX_Dither.
er
1 AX_PatternDither Pattern dithering
2 AX_Haltone45Dither Halftone 45 dithering
3 AX_Haltone90Dither Halftone 90 dithering
4 AX_Adaptive Adaptive without dithering
5 AX_FloydSteinberg Floyd-Steinberg dithering

Palette

0 (default) AX_NoDither No dith

(optional) A AX_Palette.

0 (dfaut) AX_ToColors In colors

1 AX_ToGrayScale In greyscale

Remarks If one or more parameters are not defined, the default values are used.

Crop

The Crop function allows to crop the picture.

object.Crop(X as long, Y as long, Width as long, Height as long)

Parameters X
X position.
Y
Y position.
Width
Width in pixels.
Height
Height in pixels.

See also AutoCrop,


Rotate,

Resize,

FlipVertical,

FlipHorizontal,
ResizeCanvas

FlipHorizontal
a picture.

The FlipHorizontal function applies a horizontal flip on

object.FlipHorizontal

See also FlipVertical,


Crop

Rotate,

Resize,

FlipVertical
icture.

The FlipVertical function applies a vertical flip on a p

object.FlipVertical

See also FlipHorizontal,


Crop

Resize

Rotate,

Resize,

The Resize function allows to resize a picture.

object.Resize(Width as long , Height as long)

Parameters Width
New width in pixels.
Height
New height in pixels.

See also FlipVertical,


Crop,
ResizeCanvas

ResizeCanvas
re.

FlipHorizontal,

Rotate,

The ResizeCanvas function resize the canvas of the pictu

object.ResizeCanvas(Width as long , Height as long, [CanvasMode As AX_CanvasMode


], [Color as OLE_COLOR])

Parameters Width
New width in pixels.
Height
New height in pixels.
CanvasMode (optional)
A AX_CanvasMode constant :

2 AX_To

pLeft 0
2 AX_Top 1
2 AX_TopRight 2
2 AX_Left 3
1 AX_Center 4 (by default)
2 AX_Right 5
2 AX_BottomLeft 6
2 AX_Bottom 7
2 AX_BottomRight 8

Color (optional)
Value (long or constant) to set the background color.

See also FlipVertical,


Crop,
Resize

Rotate

FlipHorizontal,

Rotate,

The Rotate function allows to rotate the picture.

object.Rotate(Angle as long, [Color as OLECOLOR])

Parameters Angle
Angle of rotation in degrees.
Color (optional)
Value (long or constant) to set the background color.

See also FlipVertical,


ResizeCanvas,
Crop

FlipHorizontal,

Resize,

GetColorAt
tmap.

The GetColorAt function allows to know a color in the bi

object.GetColorAT(X as long, Y as long)

Parameters X
X position.
Y
Y position.

Return value The function returns a long value for the color of the pixel.

See also Bold,


FontOrientation,
rline,

FontItalic,
FontSize,
FontStrikeOut,

FontName,
FontUnde

TextOut

The TextOut function allows to draw a text on a picture.

object.TextOut(Text as string, X as long, Y as long, Color as OLE_COLOR)

Parameters Text
The text to draw.
X
X position.
Y
Y position.
Color
Long value for the text color.

See also FontBold,


,
FontUnderline,

ReplaceColor
ture.

FontItalic,
FontOrientation,
FontStrikeOut,

FontName
FontSize,

The ReplaceColor function allows to replace one color of the pic

object.ReplaceColor(Color As OLE_COLOR, NewColor As OLE_COLOR, [Tolerance As Lon


g])

Parameters Color
Old color.
NewColor
New color.
Tolerance
Hue tolerance.

Merge The Merge function allows to merge the list of picture added with the Me
rgeAddFile function;

object.Merge

See also MergeClear,

DrawImage

MergeAddFile,

The DrawImage function draw a picture (use alpha blending).

object.DrawImage(File as string, X As long, Y As long)

Parameters X
X-coordinate of destination.
Y
Y-coordinate of destination.

See also

GetBlob
se).

Allows to get the picture's data from a Blob (field of a data ba

object.GetBlob [=string]

SetBlob
The SetBlob function returns in a Blob (field of a data
base) the data of the picture.

object.SetBlob

Remark
Be carefull ! Some file formats as GIF requires the use
of LZW compression under a patent from Unisys.
By default, the
LZW compression is disabled.

See also LoadBitmap,


re

ReceiveBinary

SaveBitmap,

GetPictu

Allows to receive the picture's data in an array of bytes.

object.ReceiveBinary [=string]

SendBinary
picture's data.

The SendBinary function returns in an arry of bytes the

object.SendBinary

Remark 1.SendBinary allows to disply a picture in a HTML tag <IMG> by specifing


as source an ASP file.
2. Be carefull ! Some file formats as GIF requires the use of LZW compression un
der a patent from Unisys.
By default, the LZW compression
is disabled.

See also LoadBitmap,


re

Brightness
icture.

SaveBitmap,

GetPictu

The Brightness function allows to change the brightness of the p

object.Brightness [=long]

Contrast
re.

The Contrast function allows to change the contrast of the pictu

object.Contrast [=long]

Gamma

The Gamma function changes the gamma of the picture.

object.Gamma [=double]

Hue

The Hue function allows to change the hue of the picture.

object.Hue [=long]

Lightness
ture.

The Lightness function allows to change the lightness of the pic

object.Lightness [=long]

Saturation
icture.

The Saturation function allows to change the saturation of the p

object.Saturation [=long]

Adjust Changes the brightness, contrast and gamma of the picture.

object.Adjust(Brightness as long , Contrast as long , Gamma as double)

AdjustHLS

Changes the hue, lightness and saturation of the picture.

object.AdjustHLS(Hue as long , Lightness as long , Saturation as long)

Negative

The Negative function applies a negative on the picture.

object.Negative

LogCorrection
he picture.

The LogCorrection function applies a logarithmic correction on t

object.LogCorrection

Normalize

Applies an normalisation of the picture.

object.Normalize

Equalize

Applies an egalisation of the picture.

object.Equalize

EqualizeOnLuminance

Applies an egalisation on the luminance of the picture.

object.EqualizeOnLuminance

Balance

The Balance function applies a balance of colors on the picture.

object.Balance(Color as OLE_COLOR)

Parameters Color
Color to add.

SwapColors

Swap the color component.

object.SwapColors([Model as AX_SwapModel])

Parameters Model
(optional) A color model AX_SwapModel.
u, Green

0 (dfaut) AX_RBG Red, Ble

1 AX_BGR Bleu, Green, Red


2 AX_BRG Bleu, Red, Green
3 AX_GRB Green, Red, Bleu
4 AX_GBR Green, Bleu, Red

Applies a filter on the picture.


To do.

Sepia

Applies a sepia transform on the picture.

object.Sepia([Percent As Long], [Color As OLE_COLOR])

Paramters Percent (optional)


A value between 0 and 100.
0 = grey scale picture, 100 = maximum of sepia.
Color (optional)
Color to use for the sepia transform.

DrawPoint

The DrawPoint function draws a point on the picture.

object.DrawPoint(X As long, Y As long)

Parameters X
X position.
Y
Y position.

See also LineWidth,


LineColor,
DrawPoint,
DrawLine,
DrawRectangle DrawFillRectangle,
le,
DrawFillCircle,
DrawPolygon,
Line

DrawLine

DrawCirc
DrawPoly

The DrawLine function draws a line on the picture.

object.DrawLine(X0 As long, Y0 As long, X1 As long, Y1 As long)

Parameters X0
X position of the first point.
Y0
Y position of the first point.
X1
X position of the second point.
Y1
Y position of the second point.

See also LineWidth,


LineColor,
DrawRectangle DrawFillRectangle,
Circle,
DrawPolygon,

DrawPoint,
DrawCircle,
DrawPolyLine

DrawFill

DrawRectangle

The DrawRectangle function draws a rectangle on the picture.

object.DrawRectangle(X As long, Y As long, Width As long, Height As long)

Parameters X
X position of top-left corner.
Y
Y position of top-left corner.
Width
Width of the rectangle.
Height
Height of the rectangle.

See Also LineWidth,


DrawLine,
DrawFillCircle,

LineColor,
DrawFillRectangle,
DrawPolygon,

DrawPoint,
DrawCircle,
DrawPolyLine

DrawFillRectangle
on the picture.

The DrawFillRectangle function draws a filled rectangle

object.DrawFillRectangle(X As long, Y As long, Width As long, Height As long)

Parameters X
X position of top-left corner.
Y
Y position of top-left corner.
Width
Width of the rectangle.
Height

Height of the rectangle.

See Also LineWidth,


LineColor,
DrawPoint,
DrawLine,
le,
DrawFillCircle,
Line

DrawCircle

FillColor,
DrawRectangle,
DrawPolygon,

DrawCirc
DrawPoly

The DrawCircle function draws a circle on the picture.

object.DrawCircle(X As long, Y As long, Radius As long)

Parameters X
X position of the center.
Y
Y position of the center.
Radius
Radius of the circle.

See also LineWidth,


LineColor,
DrawRectangle DrawFillRectangle,
DrawPolygon,
DrawPolyLine

DrawLine,
DrawFillCircle,

DrawFillCircle The DrawFillCircle function draws a filled circle on the picture


.

object.DrawFillCircle(X As long, Y As long, Radius As long)

Parameters X
X position of the center.

Y
Y position of the center.
Radius
Radius of the circle.

See also LineWidth,


LineColor,
FillColor,
DrawLine,
DrawRectangle DrawFillRectangle,
le,
DrawPolygon,
DrawPolyLine

AddVertex

The AddVertex function add a new vertex to the vertex list.

object.AddVertex(X As long, Y As long)

Parameters X
X position of the new vertex.
Y
Y position of the new vertex.

See also FreeVertex,

FreeVertex

DrawCirc

DrawPolygon,

DrawPolyline

The FreeVertex function frees the vertex list.

object.FreeVertex

See also AddVertex,

DrawPolygon,

DrawPolyline

DrawPolyline
he picture.

The DrawPolyline function draws a polyline with vertex list on t

object.DrawPolyline

See also LineWidth,


DrawLine,
DrawCircle,

DrawPolygon
picture.

LineColor,
DrawRectangle,
DrawFillCircle,

DrawPoint,
DrawFillRectangle,
DrawPolyLine

The DrawPolygon function draws a polygon with vertex list on the

object.DrawPolygon

Remark

You must closed the polygon.

See also LineWidth,


DrawPoint,
Rectangle,
DrawPolyLine

LineColor,
DrawLine,
DrawCircle,

GetTextWidth

The GetTextWidth function allows to get width of a text.

FillColor,
DrawRectangle,
DrawFillCircle,

DrawFill

object.GetTextWidth(Text as string)

Parameters Text
The text to draw.

See also FontBold,


,
FontUnderline,

FontItalic,
FontOrientation,
FontStrikeOut,

FontName
FontSize,

GetTextHeight
t.

The GetTextHeight function allows to get height of a tex

object.GetTextHeight(Text as string)

Parameters Text
The text to draw.

See also FontBold,


,
FontUnderline,

HasIPTC

FontItalic,
FontOrientation,
FontStrikeOut,

FontName
FontSize,

Property (read only) that returns if picture has IPTC metadata.

object.HasIPTC [=boolean]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns the IPTC Byline field.

object.IPTCByline [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCBylineTitle
field.

Property (read only) that returns the IPTC Byline Title

object.IPTCBylineTitle [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCCaption

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns the IPTC Caption field.

object.IPTCCaption [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCCaptionWriter
r field.

Property (read only) that returns the IPTC Caption Write

object.IPTCCaptionWriter [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCCategory

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns the IPTC Category field.

object.IPTCCategory [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCCity

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns the IPTC City field.

object.IPTCCity [=string]

See also HasIPTC,


neTitle,

IPTCByline,
IPTCCaption,

IPTCByli
IPTCCaptionWrite

r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCCategory,

IPTCCopyrightNotice
ice field.

Property (read only) that returns the IPTC Copyright Not

IPTCCountryName,
IPTCDateCreated,
IPTCKeywordsCount,
IPTCCopyrightNotice,
IPTCSource,
IPTCSuppCatCount,

IPTCCity,
IPTCHead
IPTCKeywords,
IPTCProv
IPTCSpecialinstr
IPTCSupp

object.IPTCCopyrightNotice [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCCountryName
field.

Property (read only) that returns the IPTC Country Name

object.IPTCCountryName [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCCredit

Property (read only) that returns the IPTC Credit field.

object.IPTCCredit [=tring]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCDateCreated

Property (read only) that returns the IPTC Created Date.

object.IPTCDateCreated [=date]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCHeadline

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns the IPTC Headline field.

object.IPTCHeadline [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead

line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCKeywordsCount,
IPTCCopyrightNotice,
IPTCSource,
IPTCSuppCatCount,

IPTCKeywords,
IPTCProv
IPTCSpecialinstr
IPTCSupp

IPTCKeywordsCount
words.

Property (read only) that returns the number of IPTC Key

object.IPTCKeywordsCount [=long]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCKeywords

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns a IPTC Keyword.

object.IPTCKeywords(Index as long) [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCObjectName Property (read only) that returns the IPTC Object Name field.

object.IPTCObjectName [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCOTR
Property (read only) that returns the IPTC Original Transmission
Reference field.

object.IPTCOTR [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCProvinceState
e field.

Property (read only) that returns the IPTC Province/Stat

object.IPTCProvinceState [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv

inceState,
uctions,
Cat

IPTCSource

IPTCSource,
IPTCSuppCatCount,

IPTCSpecialinstr
IPTCSupp

Property (read only) that returns the IPTC Source field.

object.IPTCSource [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCSpecialInstructions
al Instructions field.

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns the IPTC Speci

object.IPTCSpecialInstructions [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCSuppCat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

Property (read only) that returns a IPTC Supplemental Category.

object.IPTCSuppCat(Index as long) [=string]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

IPTCSuppCatCount
plemental Categories.

Property (read only) that returns the number of IPTC Sup

object.IPTCSuppCatCount [=long]

See also HasIPTC,


neTitle,
r,
IPTCCopyrightNotice,
IPTCCredit,
line,
IPTCOTR,
inceState,
uctions,
Cat

IPTCByline,
IPTCByli
IPTCCaption,
IPTCCaptionWrite
IPTCCategory,
IPTCCity,
IPTCCountryName,
IPTCDateCreated,
IPTCHead
IPTCKeywordsCount,
IPTCKeywords,
IPTCCopyrightNotice,
IPTCProv
IPTCSource,
IPTCSpecialinstr
IPTCSuppCatCount,
IPTCSupp

GFL SDK/GflAx standard version modes


This array gets, for each format, the pi
cture mode available for picture saving.
1 : Binary
2 : 4 Grey
3 : 8 Grey
4 : 16 Grey
5 : 32 Grey
6 : 64 Grey
7 : 128 Grey
8 : 216 Grey

9 : 256 Grey
10 : 8 Colors
11 : 16 Colors
12 : 32 Colors
13 : 64 Colors
14 : 128 Colors
15 : 216 Colors
16 : 256 Colors
17 : RGB, RGBA, BGR, ABGR, BGRA

Format Name 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
JPEG / JFIF jpeg
Truevision Targa tga
TIFF Revision 6 tiff
Windows Bitmap bmp
Amiga IFF iff
Portable Network Graphics png
CompuServe GIF gif
Zsoft Publisher's Paintbrush pcx
Zsoft Multi-page Paintbrush dcx
Portable Image pnm
Portable Bitmap pbm
Portable Greyscale pgm
Portable Pixmap ppm
Windows Icon ico
Explore (TDI) & Maya tdi
Softimage soft
Silicon Graphics RGB sgi
Image Magick file miff

X11 Bitmap xbm


X11 Pixmap xpm
Psion Serie 3 Bitmap psion3
Psion Serie 5 Bitmap psion5
Palm Pilot palm
Picture Gear Pocket prc
Windows Enhanced Metafile emf
Postscript ps
Vista vista
Alias Image File alias
Wavefront Raster file rla
SciTex Continuous Tone sct
Kodak Cineon cin
DPX dpx
DKB Ray-Tracer dkb
Qrt Ray-Tracer qrt
Vivid Ray-Tracer vivid
MTV Ray-Tracer mtv
Rayshade ray
Jeff's Image Format jif
Gimp Pattern gpat
Bio-Rad confocal biorad
VRML2 wrl
Wireless Bitmap (level 0) wbmp
YUV 16Bits Interleaved uyvyi
YUV 16Bits uyvy
Raw raw

GFL SDK/GflAx light version modes

This array gets, for each format, the pi

cture mode available for picture saving.


1 : Binary
2 : 4 Grey
3 : 8 Grey
4 : 16 Grey
5 : 32 Grey
6 : 64 Grey
7 : 128 Grey
8 : 216 Grey
9 : 256 Grey
10 : 8 Colors
11 : 16 Colors
12 : 32 Colors
13 : 64 Colors
14 : 128 Colors
15 : 216 Colors
16 : 256 Colors
17 : RGB, RGBA, BGR, ABGR, BGRA

Format Name 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
JPEG / JFIF jpeg
Truevision Targa tga
TIFF Revision 6 tiff
Windows Bitmap bmp
Amiga IFF iff
Portable Network Graphics png
CompuServe GIF gif
Zsoft Publisher's Paintbrush pcx
Portable Image pnm

Portable Bitmap pbm


Portable Greyscale pgm
Portable Pixmap ppm
X11 Bitmap xbm
X11 Pixmap xpm
Windows Enhanced Metafile emf
Postscript ps

SaveBitmap

Saves the loaded picture in a GflAx object, in a file.

object.SaveBitmap([File as string])

Parameters File
(optional) String that contains the filename (with or not the folder and/or driv
e).
By default, the installed folder of the control
is used.

Remarks 1. If there is no filename, GflAx will use the filename in the object. I
f a file has the same extension or exists already, it will be replaced by SaveBi
tmap.
2. Be carefull ! Some file formats as GIF requires the use of LZW compression un
der a patent from Unisys.
By default, the LZW compression
is disabled.

See also SaveFormat,


SaveJPEGProgressive,
SavePNGCompression,
bnail,
EnableLZW

SendBinary,

SaveGIFInterlaced,
SaveJPEGQuality,
LoadBitmap,
GetPicture,

LoadThum

SaveFormatName Sets the format for the saving.

object.SaveFormatName [=string]

Parameters
See table for light version or standard version for supp
orted formats and name.

Remarks
Be carefull ! Some file formats as GIF requires
the use of LZW compression under a patent from Unisys.
By defau
lt, the LZW compression is disabled.

See also SaveBitmap,


atDescription

SaveFormatDescription
format used to save.

SaveFormat,

Property (read only) that returns the description of the

object.SaveFormatDescription [=string]

SaveFormat

Returns or sets the format for the saving.

object.SaveFormat [=AX_FileFormats]

Parameters AX_FileFormats
A AX_SaveFormats constant:
1 AX_JPEG
2 AX_GIF
3 AX_PNG
4 AX_BMP
5 AX_TIFF

SaveForm

6 AX_TGA
7 AX_PCX
8 AX_XPM
9 AX_IFF
10 AX_SOFT
11 AX_SGI
12 AX_DCX
13 AX_PBM
14 AX_PGM
15 AX_PPM
16 AX_PNM
18 AX_XBM
19 AX_ICO
20 AX_PSION3
21 AX_PSION5
22 AX_PALM
23 AX_EMF
24 AX_VISTA
25 AX_ALIAS
26 AX_RLA
27 AX_CIN
28 AX_HRU
29 AX_DKB
30 AX_QRT
31 AX_VIVID
32 AX_MTV
33 AX_RAY
34 AX_JIF
35 AX_GPAT
39 AX_BIORAD

40 AX_RAD
42 AX_PRC
43 AX_WRL
45 AX_WBMP
47 AX_UYVYI
48 AX_UYVY
49 AX_RAW

Remarks
Be carefull ! Some file formats as GIF requires
the use of LZW compression under a patent from Unisys.
By defau
lt, the LZW compression is disabled.

See also SaveBitmap,


SaveFormatDescription

SaveJPEGQuality
JPEG format.

SaveFormatName,

Returns or sets the quality of a picture (in percent) in

object.SaveJPEGQuality [=integer]

Parameters integer
An integer between 0 and 100

See also SaveJPEGProgressive,

SaveKeepMetadata

SaveKeepMetadata

Allows to keep metadata for saving.

object.SaveKeepMetadata [=boolean]

See also SaveJPEGQuality,

SaveJPEGProgressive
G format.

SaveJPEGProgressive

Returns or sets the progressive mode of a picture in JPE

object.SaveJPEGProgressive [=boolean]

See also SaveJPEGQuality,

TextOut

SaveKeepMetadata

The TextOut function allows to draw a text on a picture.

object.TextOut(Text as string, X as long, Y as long, Color as OLE_COLOR)

Parameters Text
The text to draw.
X
X position.
Y
Y position.
Color
Long value for the text color.

See also FontBold,


,
FontUnderline,

FontItalic,
FontOrientation,
FontStrikeOut,

FontName
FontSize,

EnableLZW

Enables or disables the use of LZW compression.

object.EnableLZW [=boolean]

Remarks
r patent of Unisys.

Be carefull ! The use of LZW compression is unde


By default, this is disabled.

See also LoadBitmap,


ry

SaveBitmap,

SendBina

AutoCrop
The AutoCrop function allows to crop a picture automatic
ally according to the background color.
object.AutoCrop([Color as OLE_COLOR], Tolerance As long)

Parameters Color
(optional) The background color. Else the background color is the color at x=0,
y=0.
Tolerance
(optional) The tolerance value.

See also Crop,


Rotate,

FlipVertical,
Resize,

FlipHorizontal,
ResizeCanvas

ResizeCanvas
re.

The ResizeCanvas function resize the canvas of the pictu

object.ResizeCanvas(Width as long , Height as long, [CanvasMode As AX_CanvasMode


], [Color as OLE_COLOR])

Parameters Width
New width in pixels.
Height
New height in pixels.
CanvasMode (optional)
A AX_CanvasMode constant :

2 AX_To

pLeft 0
2 AX_Top 1
2 AX_TopRight 2
2 AX_Left 3
1 AX_Center 4 (by default)
2 AX_Right 5
2 AX_BottomLeft 6
2 AX_Bottom 7
2 AX_BottomRight 8

Color (optional)
Value (long or constant) to set the background color.

See also FlipVertical,


Crop,
Resize

MergeAddFile

FlipHorizontal,

The MergeAddFile function add a new filename to the merge list.

object.MergeAddFile(File As string, Opacity As long, Y As long)

Parameters File
Filename.
Opacity

Rotate,

Opacity of the picture, 0 to 100 (%).


X
X position of the top-left corner.
Y
Y position of the top-left corner.

Remark

The first member of the array is the first layer.

See also MergeClear,

MergeClear

Merge

The MergeClear function frees the filename/origin/opacity list.

object.MergeClear

See also Merge,

MergeAddFile

MergeAddFile

The MergeAddFile function add a new filename to the merge list.

object.MergeAddFile(File As string, Opacity As long, Y As long)

Parameters File
Filename.
Opacity
Opacity of the picture, 0 to 100 (%).
X
X position of the top-left corner.

Y
Y position of the top-left corner.

Remark

The first member of the array is the first layer.

See also MergeClear,

DrawPolyline
he picture.

Merge

The DrawPolyline function draws a polyline with vertex list on t

object.DrawPolyline

See also LineWidth,


DrawLine,
DrawCircle,

LineColor,
DrawRectangle,
DrawFillCircle,

DrawPoint,
DrawFillRectangle,
DrawPolyLine

You might also like