|
ImagOMatix - ASP Component For Image Processing
ImagOMatix
What is ImagOMatix?
ImagOMatix is a component that can be used to edit, modify, enhance and resize
an existing image. The component has been developed as a COM component. So its
use is not limited to any one kind of technology. You can use it in your VB,
VBScript, JavaScript, C++, MFC or any application that is capable of creating
COM objects. The components has a very rich set of API that can be used for a
simple task like getting size of an image to a very complex task like disecting
an image into X number of parts and then modifying each part differently and
then merging them back. We understand that you may not need all the features
for your need. Therefore this component is released in different flavors. You
can buy the version thatr best fits your needs. ImagoMatix is a component for
use on your ASP/ASP.Net web pages. It is used for image processing needs of
your application. This new release of the product incorporates a lot of bug
fixes and suggestion reported by the users of previous version.
Key Features
-
Determine the size of any image.
-
Create thumbnail images on the fly from an existing file.
-
Write text on an image file at a specified location.
-
Mask one image on top of another image at a specified location.
-
Image flipping
-
Cration of grey scale image
-
Creation of negative image
-
Application of color filters to an image
-
Specifying the source image from an existing file or supplying image as stream
already stored in a database
-
Support for resizing GIF images with transparent pixels
-
Support for popular image formats like BMP, JPEG, GIF, PNG, TIFF
Where Can I Use It?
The use of this component are not just limited to ASP applications. Since it is
a COM component, you can use it for any application that is capable of creating
COM server objects and calling methos on it. If your application involves
uploading image files from clients, then you can determine the size of images
at run time and depending on thoses you can accept or reject the uploaded file.
Other use can be to create thumbnail image from a huge image and store that for
displaying.
How do I use it?
The component is very easy to use. In your ASP page, you will create it as any
other COM component and invoke the properties or methods on it.
Example1 - Determining Size Of Image
<%@Language=javascript%>
<%
Response.Buffer = true;
var obImgEngine = null;
var obImage = null;
try
{
// Create image charting engine.
obImgEngine = Server.CreateObject("NETOMATIX.ImageEngine");
var strImgFile = Server.MapPath("CD001.jpg");
obImage = obImgEngine.GetImageSize(strImgFile);
Response.Write("Width: " + obImage.Width);
Response.Write("<br>");
Response.Write("Height: " + obImage.Height);
}
catch (ex)
{
Response.Write(ex.description);
}
%>
Example2 - Creating Thumbnail Image
<%@Language=javascript%>
<%
Response.Buffer = true;
var obImgEngine = null;
var obImage = null;
try
{
obImgEngine = Server.CreateObject("NETOMATIX.ImageEngine");
var strImgFile = Server.MapPath("CD001.jpg");
var strDestFile = Server.MapPath("uploadedfiles/CD001_th.jpg");
obImgEngine.CreateThumbnail(strImgFile, strDestFile, 30, 30, 0, 1);
}
catch (ex)
{
Response.Write(ex.description);
}
%>
Example3 - Merging two images
<%@Language=javascript%>
<%
Response.Buffer = true;
var obImgEngine = null;
var obImage = null;
try
{
obImgEngine = Server.CreateObject("NETOMATIX.ImageEngine");
var x = 0;
var y = 0;
var strImgFile = Server.MapPath("CD001.jpg");
var strLogoImage = Server.MapPath("logo.jpg");
var strDestFile = Server.MapPath("uploadedfiles/CD001_masked.jpg");
obImgEngine.MergeImages(strImgFile, strLogoImage, strDestFile, 3, 1, x, y);
}
catch (ex)
{
Response.Write(ex.description);
}
%>
Example4 - Writing text on an image
<%@Language=javascript%>
<%
Response.Buffer = true;
var obImgEngine = null;
var obImage = null;
try
{
obImgEngine = Server.CreateObject("NETOMATIX.ImageEngine");
var x = 0;
var y = 0;
var strImgFile = Server.MapPath("CD001.jpg");
var strLogoText = "Pardesi Logo";
var obFont = pImageEngine.GetFontObject();
var obColor = pImageEngine.GetColorObject();
obColor.R = 255;
obColor.G = 0;
obColor.B = 255;
obFont.Name = "Arial";
obFont.Size = 12;
obFont.Bold = true;
var strDestFile = Server.MapPath("uploadedfiles/CD001_text.jpg");
obImgEngine.WriteTextOnImage(strImgFile, strDestFile, strLogoText, 1, x, y, obFont, obColor, 1);
}
catch (ex)
{
Response.Write(ex.description);
}
%>
What methods to call?
-
GetImageSize
-
bstrSourcercImageFile - Source image file path
-
ImageObject is returned. It supports two properties,
Width and Height.
Use these properties to get image size information.
-
CreateThumbnail
-
SourceFile - Used to specify the path for source image
-
DestFile = Used to specify the path for thumnail image file.
-
Width - Used to specify width of thumbnail
-
Height - Used to specify height of thumbnail
-
ModificationBy - Used to specify method to be used to calculate the size
of thumbnail image.
-
0 - MODIFY_ABSOLUTE, The method will use the values specified in Width and
Height parameters as size of the thumbnail.
-
1 - MODIFY_PERCENTAGE, The method will calculate the thumnail dimensions as
percentage of the source image size. If you choose this method, the values of
Width and Height parameters should be between 0 and 100.
-
Format - Used to specify image format for destination thumbnail file.
Currently the component supports the following formats.
-
0 - bmp
-
1 - jpeg
-
2 - gif
-
3 - png
-
4 - tiff
-
CreateThumbnailEx This is new method in version 2.7. It should only be
used to resize GIF images with transparent pixels.
-
SourceFile - Used to specify the path for source image
-
DestFile = Used to specify the path for thumnail image file.
-
Width - Used to specify width of thumbnail
-
Height - Used to specify height of thumbnail
-
ModificationBy - Used to specify method to be used to calculate the size
of thumbnail image.
-
0 - MODIFY_ABSOLUTE, The method will use the values specified in Width and
Height parameters as size of the thumbnail.
-
1 - MODIFY_PERCENTAGE, The method will calculate the thumnail dimensions as
percentage of the source image size. If you choose this method, the values of
Width and Height parameters should be between 0 and 100.
-
Format - Used to specify image format for destination thumbnail file.
Currently the component supports the following formats.
-
0 - bmp
-
1 - jpeg
-
2 - gif
-
3 - png
-
4 - tiff
-
WriteTextOnImage
-
SourceFile - Used to specify the path for source image
-
DestFile = Used to specify the path for thumnail image file.
-
Text - Text string that needs to be written on the image.
-
PosType - Used to specify position where text needs to be drawn on
image. This variable can have one of the following value.
-
0 - TopLeft, The text will be drawn on upper left corner of image.
-
1 - TopRight, The text will drawn on upper right corner of image.
-
2 - BottomLeft, The text will be drawn on lower left corner of image.
-
3 - BottomRight, The text will be drawn on lower right corner of the image/
-
4 - TopCenter, The text will be drawn on top center position of the image.
-
5 - BottomCenter, The text will drawn on lower centre position of the image.
-
6 - Center, The text will be drawn in the middle of the image.
-
7 - Custom, The text will be drawn at the position specified by x and y
parameters.
-
x - X-corodinate of the position where text should be drawn. This value
if only used if PosType parameter value is set to Custom.
-
y - Y-corodinate of the position where text should be drawn. This value
if only used if PosType parameter value is set to Custom.
-
FontObject - You can specify the font to be used for drawing text. This
object can be obtained by calling GetFontObject method on ImageEngine object.
-
ColorObject - You can specify the color to be used for drawing text.
This object can be obtained by calling GetColorObject method on ImageEngine
object. You can specify R,G,B and A values for this object.
-
Format - Used to specify image format for destination file. Currently
the component supports the following formats.
-
0 - bmp
-
1 - jpeg
-
2 - gif
-
3 - png
-
4 - tiff
-
MergeImages
-
BaseImageFile - Used to specify the path for source image
-
MaskImageFile - Used to specify the path for source image
-
DestFile = Used to specify the path for thumnail image file.
-
PosType - Used to specify position where mask image should be drawn on
the base image. The parameter can have one of the following values.
-
0 - TopLeft, The mask image will be drawn on upper left corner of image.
-
1 - TopRight, The mask image will drawn on upper right corner of image.
-
2 - BottomLeft, The mask image will be drawn on lower left corner of image.
-
3 - BottomRight, The mask image will be drawn on lower right corner of the
image/
-
4 - TopCenter, The mask image will be drawn on top center position of the
image.
-
5 - BottomCenter, The mask image will drawn on lower centre position of the
image.
-
6 - Center, The mask image will be drawn in the middle of the image.
-
7 - Custom, The mask image will be drawn at the position specified by x and y
parameters.
-
Format - Used to specify image format for destination file. Currently
the component supports the following formats.
-
0 - bmp
-
1 - jpeg
-
2 - gif
-
3 - png
-
4 - tiff
-
x - X-corodinate of the position where mask image should be drawn. This
value if only used if PosType parameter value is set to Custom.
-
y - Y-corodinate of the position where mask image should be drawn. This
value if only used if PosType parameter value is set to Custom.
How to install it?
-
Unzip
NetImaging.zip file to extract NetImaging.dll file.
-
Copy the DLL in folder where you want to install it.
-
Using
regsvr32 utility, register the component on your machine.
Make sure that you have administrative previleges on the machine.
-
Make sure that you have GdiPlus installed on your machine. If you don't have
it, you can get the library from
Microsoft.
Buy
ImagoMatix Professional
Buy
ImagoMatix Enterprise
|