 |
|
| |
|
|
|
 |
|
A number of other parameters are available for image related operations.
These may involve drawing Graphics Files or Data and drawing one
Canvas onto another.
|
|
|
|
|
|
|
| |
|
| |
|
|
This is used to specify or override the type of image data. You
can specify a type in a number of ways - you can use either a sample
filename, a MIME type or the name of a Graphics Exporter. This is
generally used to specify a file type or to override the default
file type which would be used.
For example the following will save a jpeg out without a file extension:
[VBScript]
mycanvas.SaveAs Server.MapPath("myimage"), "Type='dummy.jpg'"
|
|
|
|
|
|
|
| |
|
| |
|
|
Graphic files and data may contain multiple images. If they do
this parameter allows you to specify the number of the image you
are interested in.
By default this is 1 which indicates the whole or composite image.
For example the following will draw the second image in a Photoshop
file onto the canvas.
[VBScript]
mycanvas.DrawFile Server.MapPath("layers.psd"), "Image=2"
|
|
|
|
|
|
|
| |
|
| |
|
|
Movies do not have well defined numbers of images. Particular tracks
of a movie may have numbers of frames but these may not be a constant
time apart and there may be more than one such track in a movie.
You specify an image within a movie by giving a number of seconds
from the start.
By default the Time is zero which indicates the start of the movie.
For example the following will draw an image from a movie at a
period two and a half seconds from the start.
[VBScript]
mycanvas.DrawFile Server.MapPath("sport.mov"), "Time=2.5"
|
|
|
|
|
|
|
| |
|
| |
|
|
When you draw an image it is always drawn to fit exactly inside
the rectangle you have provided. If you have a tall thin image and
you draw it into a short fat rectangle then this may involve considerable
distortion. By setting the fit parameter to true the rectangle will
automatically be altered to minimize this distortion.
Providing the image is smaller than the rectangle it will be drawn
at its natural size within the rectangle. If the object if larger
than the rectangle, it will be proportionally scaled down (maintaining
its original shape) to fit it within the rectangle.
The VAlign and HAlign parameters are used to align the object within
the rectangle once it has been scaled as necessary.
For example the following will draw an image centered (and scaled
if necessary) onto a canvas.
[VBScript]
mycanvas.DrawCanvas othercanvas.Image, "Fit = true Valign=middle
HAlign=middle"
|
|
|
|
|
|
|
| |
|
| |
|
|
The drawing mode determines how images are transferred to the Canvas.
The possible options are:
- "copy" (the default)
- "transparent"
- "blend"
- "addover"
- "addmax"
- "addpin"
- "subover"
- "submin" - only available for use in selection
- "subpin"
- "prewhitealpha"
- "preblackalpha"
- "addmin"
Copy does what you might expect performing a faithful copy of the
source image onto the destination area.
Transparent uses the alpha channel of the source image to combine
it with the destination image. Depending on how transparent or opaque
each point on the image is the two points will be blended together
in varying proportions. Note that if you have not explicitly specified
an alpha channel for your canvas you will probably find that it
is completely transparent.
Blend is a variation on the Transparent mode that uses the ModeColor
(see the parameter of the same name) to do a variable blend of the
source and destination picture in conjunction with the alpha channel.
The add and sub modes add together or subtract the component brightnesses
of each of the corresponding points in the image. The different
variants of the add and subtract modes deal with what happens to
brightness' once they go over 100% or under 0%. The over modes do
a rotation: 70% plus 70% becomes 40%, 30% minus 50% becomes 80%.
The min and max modes pin the maximum value to 100% and minimum
to 0%. The pin modes allow you to specify a different value to pin
the maximum and minimum values to. This pin value is determined
using the ModeColor (see the parameter of the same name).
Prewhitealpha and Preblackalpha are variations on the Transparent
mode. Prewhitealpha pre-multiplies each pixel with a white pixel
depending on its alpha value. Essentially this performs a transparent
copy onto a white background. Preblackalpha does exactly the same
but with a black pixel. Both may be used to reduce the amount of
'jaggyness' around the edges of objects.
For example the following draws one canvas transparently onto another:
[VBScript]
mycanvas.DrawCanvas myothercanvas.Image, "Mode=transparent"
The addmin mode is an exception to the rules specified above. It
inserts the minimum of the component brightness' of each of the
corresponding points in the image.
|
|
|
|
|
|
|
| |
|
| |
|
|
This color is used in some drawing modes as a parameter. It is
specified just like any other color.
For example the following draws one canvas blended 50% into another:
[VBScript]
mycanvas.DrawCanvas myothercanvas.Image, "Mode=blend ModeColor=50,50,50"
|
|
|
|
|
|
|
| |
|
| |
|
|
When you are drawing an image into a Canvas ImageGlue assumes that
you want to draw the whole of that image. But sometimes you may
want to draw only a small part of the image. You can use this parameter
to specify the part of the image you would like drawn.
For example the following draws a ten pixel square out of one canvas
onto another:
[VBScript]
mycanvas.DrawCanvas myothercanvas.Image, "SrcRect=10,10,20,20"
|
|
|
|
|
|
|
| |
|
| |
|
|
When images need to be resized or transformed ImageGlue chooses
an appropriate type of resize algorithm to produce the highest quality
result in the shortest possible time. Under certain circumstances
you may prefer to override the automatic choice of algorithm.
The possible options are:
- "auto" (the default)
- "nearest" (nearest neighbor)
- "linear" (linear interpolation)
- "cubic" (cubic interpolation)
- "super" (super-sampling)
Note that this parameter is ignored if the IPL parameter is set
to false.
For example the following will fit an image to a canvas using a
cubic interpolation algorithm.
[VBScript]
mypath = Server.MapPath("/mypic.gif")
mycanvas.DrawFile mypath, "Fit=true interpolation=cubic"
|
|
|
|
|
|
|
| |
|
| |
|
|
When images are transformed in certain ways ImageGlue may automatically
choose smooth the edges of the image to prevent 'jaggies'. Under
certain circumstances you may prefer to override this behavior.
By default this is true indicating that edges will be smoothed.
Note that this parameter is ignored if the IPL parameter is set
to false.
For example the following will draw an image on a canvas without
edge smoothing.
[VBScript]
mypath = Server.MapPath("/mypic.gif")
mycanvas.DrawFile mypath, "Rotate=45 edgesmoothing=false"
|
|
|
|
|
|
|
| |
|
| |
|
|
When images need to be resized or transformed ImageGlue uses an
Intel optimized Image Processing Library (IPL) for fast high quality
results. However under certain conditions you may prefer to use
standard GDI routines.
By default this is true indicating that the IPL will be used. This
default value can itself be overridden from the IGSettings control
panel.
For example the following will fit an image to a canvas without
using the IPL.
[VBScript]
mypath = Server.MapPath("/mypic.gif")
mycanvas.DrawFile mypath, "Fit=true IPL=false"
|
|
|
|
|
|
|
| |
|
| |
|
|
ImageGlue operates on a waterfall model. Processing is attempted
with successive modules until one is found that supports the specific
image or operation.
Using the Modules parameter you can alter which modules are used
and in what order they are called when graphics are being drawn.
The modules that are available are:
- TIF - Custom TIFF Library
- IJL - Accelerated JPEG Library
- QTI - QuickTime Graphics Importers (if available)
- GDI - GDI+ Graphics Importers (if available)
- JB2 - JBIG2 Library
- PSD - Photoshop File Importer
- APS - Advanced PostScript Rendering Library
- PS - PostScript & PDF Importer (if enabled)
- EPSF - Encapsulated PostScript Preview Importer
- IM - ImageGlue Graphics Importers
- QTM - QuickTime Movie Importers (if available)
- TXT - Text Rendering
The default for this parameter is:
Modules='TIF,IJL,JB2,PSD,APS,PS,EPSF,WMF,QTI,GDI,IM,QTM,TXT'
Note that this parameter is only used when drawing images and not
when saving or getting information from them. Also note that if
a module is disabled from IGSettings it cannot be made available
using this parameter.
|
|
|
|
|
|
|
| |
|
| |
|
|
Some types of images are resolution independent. For example a
PostScript file contains a set of drawing commands designed for
drawing on a page. Although the physical size of the page is specified,
the resolution in dots per inch (dpi) is not.
When you render a resolution independent image you can choose the
resolution at which you wish your image to be rendered. Higher resolutions
will result in larger images. Note that rendering at a resolution
which will produce an appropriately sized image is much more efficient
than rendering at a high resolution and then resizing the resulting
image.
This parameter is currently used only by the EPSF/PDF Render Module.
See the
PostScript Handling section for more details.
The default resolution is 72 dpi.
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "Res=300"
|
|
|
|
|
|
|
| |
|
| |
|
|
Rendering some types of images can be time consuming and place
a heavy load on the server. By specifying a timeout you ensure that
operations will be abandoned if they take too long.
This parameter is currently used only by the EPSF/PDF Render Module.
See the
PostScript Handling section for more details.
The timeout is measured in seconds. The default is 45 seconds.
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "Timeout=10"
|
|
|
|
|
|
|
| |
|
| |
|
|
This parameter allows you to specify a color space for an image.
Vector formats like PostScript are designed to allow the precise
control of colors for a specific device (e.g. a CMYK printer). If
you reproduce these colors on a different device (e.g. an RGB screen)
the colors may not be consistent. By specifying the color space
that the image was originally intended for ImageGlue can adjust
colors so that they appear correctly.
The possible options are:
If you specify the "Undefined" color space, ImageGlue will attempt
to intelligently determine the intended color space by looking at
the image being processed.
This parameter is currently used only by the EPSF/PDF Render Module.
See the
PostScript Handling section for more details.
The default ColorSpace is "Undefined".
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "ColorSpace=CMYK"
|
|
|
|
|
|
|
| |
|
| |
|
|
This parameter allows you to choose whether vector images should
be rendered anti-aliased or not.
When vector images such as PostScript are rendered, lines and polygons
may be drawn either normally or anti-aliased. Drawn normally, a
line or polygon may appear 'jaggy' along its diagonol edges. Drawn
anti-aliased the line or polygon will be blurred at the edges so
that they appear smooth. Images also may be drawn anti-aliased.
For example, a highly detailed image may be rendered into a space
occupying fewer pixels than the original image. If drawn anti-aliased,
the image is sampled at a higher resolution and a filter is applied
to compute an 'average' color for the destination pixel. However
anti-aliased rendering uses extra memory and places a heavier load
on the server so you may wish to disable it using this parameter.
This parameter is currently used only by the EPSF/PDF Render Module.
See the
PostScript Handling section for more details.
AntiAlias defaults to true, which is the highest
quality anti-aliasing available. It may also be set to false
indicating no anti-aliasing or any combination of poly,
image and text indicating anti-alias
polygons, images and text respectively.
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "AntiAlias=false"mycanvas.DrawFile
Server.MapPath("zoo.pdf"), "AntiAlias=poly,image,text"
|
|
|
|
|
|
|
| |
|
| |
|
|
This parameter allows you to choose whether PDF pages should be
automatically rotated in the same way that Acrobat does when it
encounters a landscape page.
Auto-rotation defaults to true.
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "AutoRotate=false"
|
|
|
|
|
|
|
| |
|
| |
|
|
A path to the default CMYK ICC color profile.
This parameter is used only by the Advanced PostScript module when
rendering EPS or PDF files. It is used to specify the profile that
will be used to convert any device CMYK specified in the PDF file
to the device independent working color space.
This is used when the output ColorSpace is Lab or another device
independent color space such as sRGB. If the IccOutput indicates
that a color profile should be used the output is always device
independent. If the IccOutput indicates that no color profile should
be used then the output is always device dependent.
This property can take a path to an icm file. However there are
also two special values you can use. If the property takes the value
"device" then the device color space will be used. If the property
takes the value "standard" then a built in default color profile
will be used.
If this property is set to "standard" or a path to a color profile
then IccRgb, IccCmyk, IccGray and IccOutput should also be set to
"standard" or paths to color profiles. All color spaces are assumed
to be device independent color spaces.
If this property is set to "device" then IccRgb, IccCmyk, IccGray
and IccOutput should also be set to "device". All color spaces are
all assumed to be device color spaces.
If this property is set to a file name with no path information,
then the folder "<windows>\system32\spool\drivers\color" will
be searched to locate the file.
This parameter defaults to "standard".
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "IccCmyk=myprofile.icm"
|
|
|
|
|
|
|
| |
|
| |
|
|
A path to the default RGB ICC color profile.
This parameter is used only by the Advanced PostScript module when
rendering EPS or PDF files. It is used to specify the profile that
will be used to convert any device RGB specified in the PDF file
to the device independent working color space.
This is used when the output ColorSpace is Lab or another device
independent color space such as sRGB. If the IccOutput indicates
that a color profile should be used the output is always device
independent. If the IccOutput indicates that no color profile should
be used then the output is always device dependent.
This property can take a path to an icm file. However there are
also two special values you can use. If the property takes the value
"device" then the device color space will be used. If the property
takes the value "standard" then a built in default color profile
will be used.
If this property is set to "standard" or a path to a color profile
then IccRgb, IccCmyk, IccGray and IccOutput should also be set to
"standard" or paths to color profiles. All color spaces are assumed
to be device independent color spaces.
If this property is set to "device" then IccRgb, IccCmyk, IccGray
and IccOutput should also be set to "device". All color spaces are
all assumed to be device color spaces.
If this property is set to a file name with no path information,
then the folder "<windows>\system32\spool\drivers\color" will
be searched to locate the file.
This parameter defaults to "standard".
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "IccRgb=myprofile.icm"
|
|
|
|
|
|
|
| |
|
| |
|
|
A path to the default Grayscale ICC color profile.
This parameter is used only by the Advanced PostScript module when
rendering EPS or PDF files. It is used to specify the profile that
will be used to convert any device Grayscale specified in the PDF
file to the device independent working color space.
This is used when the output ColorSpace is Lab or another device
independent color space such as sRGB. If the IccOutput indicates
that a color profile should be used the output is always device
independent. If the IccOutput indicates that no color profile should
be used then the output is always device dependent.
This property can take a path to an icm file. However there are
also two special values you can use. If the property takes the value
"device" then the device color space will be used. If the property
takes the value "standard" then a built in default color profile
will be used.
If this property is set to "standard" or a path to a color profile
then IccRgb, IccCmyk, IccGray and IccOutput should also be set to
"standard" or paths to color profiles. All color spaces are assumed
to be device independent color spaces.
If this property is set to "device" then IccRgb, IccCmyk, IccGray
and IccOutput should also be set to "device". All color spaces are
all assumed to be device color spaces.
If this property is set to a file name with no path information,
then the folder "<windows>\system32\spool\drivers\color" will
be searched to locate the file.
This parameter defaults to "standard".
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "IccGray=myprofile.icm"
|
|
|
|
|
|
|
| |
|
| |
|
|
The page box to use when determining the visible area of a PDF
page.
The MediaBox defines the area of a page - the actual media size.
However there are other measures as well.
The possible options are:
- "cropbox" (the default)
- "artbox"
- "bleedbox"
- "trimbox"
- "mediabox"
The CropBox defines "the visible region of default user space.
When the page is displayed or printed, its contents are to be clipped
(cropped) to this rectangle and then imposed on the output medium".
When you display your PDF in Acrobat what you see is the area of
the page defined by the CropBox rather than the MediaBox. This is
why the ImageGlue default is the CropBox.
[VBScript]
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "PDFCropBox=MediaBox"
|
|
|
|