Merging two images (ASP)
Moderators: XnTriq, helmut, xnview
Merging two images (ASP)
Hi,
I'm trying to use GFLAx to merge 2 gifs from within an ASP page. The problem I have is how to properly define the TYPE of AX_Image from ASP.
Is this possible? Or will I need to write a wrapper COM object to handle it?
Thanks
I'm trying to use GFLAx to merge 2 gifs from within an ASP page. The problem I have is how to properly define the TYPE of AX_Image from ASP.
Is this possible? Or will I need to write a wrapper COM object to handle it?
Thanks
-
- Author of XnView
- Posts: 45068
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Merging from ASP
Hi,
Regards. Pierre.
A new version of GFLAX will be available the next week, with merging feature.Jimmeh wrote:I'm trying to use GFLAx to merge 2 gifs from within an ASP page. The problem I have is how to properly define the TYPE of AX_Image from ASP.Is this possible? Or will I need to write a wrapper COM object to handle it?
Regards. Pierre.
Where? Where Merge for ASP?
I'm very .. I'm very want Merge method for ASP....
Maybe some simple function which Merge current image with only one other image?.... something as .Merge( filename, opacity, x, y) ... without any arrays & structures.... ????
Maybe some simple function which Merge current image with only one other image?.... something as .Merge( filename, opacity, x, y) ... without any arrays & structures.... ????
-
- Posts: 1
- Joined: Sun Jun 27, 2004 4:34 pm
when the merge option is avaiable?
Hi,
thanks a lot for your job, If u need anything call me! I ask you only the merge method. Is it avaiable?
Please make me a little example. Thanks
Miku
thanks a lot for your job, If u need anything call me! I ask you only the merge method. Is it avaiable?
Please make me a little example. Thanks
Miku
-
- Author of XnView
- Posts: 45068
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: when the merge option is avaiable?
Miku wrote:Please make me a little example.
Code: Select all
.MergeAddFile Path & "\img0.tif", 40, 0, 0
.MergeAddFile Path & "\img1.tif", 15, 0, 0
.MergeAddFile Path & "\img2.tif", 15, 0, 0
.MergeAddFile Path & "\img3.tif", 20, 0, 0
.Merge
Merging example
Hello!
I've tried your code (after studying the help file) and it always returns "an empty object". I mean, if I try with applying date.gif to existing picture:
there comes to error with sir being "empty": GflAx.GflAx.1 error '80004005'
No file opened
Do I have to load an initial image? How to get and use the merged image?
Thank you,
Andy
I've tried your code (after studying the help file) and it always returns "an empty object". I mean, if I try with applying date.gif to existing picture:
Code: Select all
Set sir = Server.CreateObject("GflAx.GflAx")
sir.EnableLZW = true
with sir
.MergeAddFile Server.MapPath("pic1.gif"),40,0,0
.MergeAddFile Server.MapPath("pic2.gif"),15,0,0
.Merge
end with
' any object Method
sir.Crop 100,100,200,200 '<- this line
No file opened
Do I have to load an initial image? How to get and use the merged image?
Thank you,
Andy
-
- Author of XnView
- Posts: 45068
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Merging example
Yes load a picture, or create a new one before mergingAndy wrote:Hello!
I've tried your code (after studying the help file) and it always returns "an empty object". I mean, if I try with applying date.gif to existing picture:there comes to error with sir being "empty": GflAx.GflAx.1 error '80004005'Code: Select all
Set sir = Server.CreateObject("GflAx.GflAx") sir.EnableLZW = true with sir .MergeAddFile Server.MapPath("pic1.gif"),40,0,0 .MergeAddFile Server.MapPath("pic2.gif"),15,0,0 .Merge end with ' any object Method sir.Crop 100,100,200,200 '<- this line
No file opened
Do I have to load an initial image? How to get and use the merged image?
Thank you,
Andy
Pierre.
-
- Posts: 16
- Joined: Wed Sep 21, 2005 9:30 am
- Location: Denmark
does this work with RGBA formats? e.g. TIFF or PNG with alpha-channel?
I want to use it for watermarking, but it doesn't seem to work.
I modified the "merge.asp" example as follows:
But when I uncomment the merge command for "logo.png", the SaveBitmap command returns error '80004005' ("no file opened").
I've also tried with a TIFF instead, but same result.
Do I have to save in PNG or TIFF format, and if so, specifically what settings should I use when saving out of Photoshop?
Is merging with alpha-channel supported in the first place?
You can get my "logo.png" and "logo.tif" I use for testing here:
http://www.danline.dk/test/logo.zip
...
By the way, AX_JPEG was set to 3 in the provided example - which is wrong, according to the documentation the code for JPEG should be 1.
I want to use it for watermarking, but it doesn't seem to work.
I modified the "merge.asp" example as follows:
Code: Select all
<HTML>
<HEAD></HEAD>
<BODY>
<%
const AX_JPEG = 1
Dim Path, File
Set ctrl = server.createobject("GflAx.GflAx")
Path = Server.MapPath(".")
File = Path & "\image.jpg"
With ctrl
.EnableLZW = TRUE
.MergeAddFile Path & "\img0.tif", 40, 0, 0
.MergeAddFile Path & "\img1.tif", 15, 0, 0
.MergeAddFile Path & "\img2.tif", 15, 0, 0
.MergeAddFile Path & "\img3.tif", 20, 0, 0
'.MergeAddFile Path & "\logo.png", 20, 0, 0
.Merge
.SaveFormat = AX_JPEG
.SaveJPEGQuality = 70
.SaveBitmap Path & "\result.jpg"
end with
set ctrl=nothing
%>
<IMG SRC="result.jpg">
</BODY>
</HTML>
I've also tried with a TIFF instead, but same result.
Do I have to save in PNG or TIFF format, and if so, specifically what settings should I use when saving out of Photoshop?
Is merging with alpha-channel supported in the first place?
You can get my "logo.png" and "logo.tif" I use for testing here:
http://www.danline.dk/test/logo.zip
...
By the way, AX_JPEG was set to 3 in the provided example - which is wrong, according to the documentation the code for JPEG should be 1.
-
- Author of XnView
- Posts: 45068
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 16
- Joined: Wed Sep 21, 2005 9:30 am
- Location: Denmark
-
- Posts: 16
- Joined: Wed Sep 21, 2005 9:30 am
- Location: Denmark
oh, and here's the corrected code for placing the "logo.png" in the lower-right corner, on top of the image.
Code: Select all
With ctrl
.EnableLZW = TRUE
.LoadBitmap Path & "\logo.png"
LogoW = .Width
LogoH = .Height
.LoadBitmap File
.DrawImage Path & "\logo.png", .Width-LogoW, .Height-LogoH
.SaveFormat = AX_JPEG
.SaveJPEGQuality = 70
.SaveBitmap Path & "\result.jpg"
end with