 |
|
| |
|
|
|
 |
|
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:
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.
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.
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.
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:
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:
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:
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.
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.
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.
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:
- IJL - Accelerated JPEG Library
- QTI - QuickTime Graphics Importers (if available)
- GDI - GDI+ Graphics Importers (if available)
- IM - ImageGlue Graphics Importers
- PS - PostScript & PDF Importer (if enabled)
- EPSF - Encapsulated PostScript Preview Importer
- QTM - QuickTime Movie Importers (if available)
The default for this parameter is:
Modules='IJL,QTI,GDI,IM,PS,EPSF,QTM'
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.
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 default timeout is 45 seconds.
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".
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 may be
drawn either normally or anti-aliased. Drawn normally a line may
appear 'jaggy'. Drawn anti-aliased the line will be blurred at the
edges so that it appears smooth. 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.
Anti-aliasing defaults to true.
mycanvas.DrawFile Server.MapPath("zoo.pdf"), "AntiAlias=false"
|
|
|
|