Page 1 of 1

Dynamic image merging

Posted: Sat Jun 24, 2006 9:42 am
by Babar
Hello everyone,

I am rendering images from ASP code and using that image in <img> (working fine) now i want to use GflAx to merge one another image with the rendered image i tried so many combinations but not able to get the merged image not even actull image when i use GflAx.

My Code:-

Code: Select all

       ctrl =Server.CreateObject("GflAx.GflAx");
	ctrl.EnableLZW = 0;
	ctrl.MergeAddFile(imagegen.Render(), 10, 0, 0); /*where imagegen is a module which is generating map images in PNG format*/
	ctrl.MergeAddFile ("arrow.png", 15, 0, 0);
	//ctrl.LoadBitmap(mapserver.Render());
	//ctrl.DrawLine(0,0,100,100);
	ctrl.Merge();
                ctrl.SaveformatName = "jpeg";
	Response.BinaryWrite(ctrl.SendBinary());
	ctrl=null;		
It is possible to use GflAx for that purpose ? and how to do that task ? i m getting missing image when i tried above code with my existing code.

What might be the reason ? any clue ?

Thanks
Babar Shafiq.

Dynamic image merging

Posted: Sat Jun 24, 2006 11:29 am
by Babar
Hi,

Also tried

Code: Select all

	var Path = Server.MapPath(".") ;
	var File = Path + "\\arrow.png";
	ctrl =Server.CreateObject("GflAx.GflAx");
	
	ctrl.EnableLZW = 0;
	ctrl.MergeAddFile(ctrl.ReceiveBinary(image), 10, 0, 0);
	ctrl.MergeAddFile (File, 15, 0, 0);
	ctrl.Merge();
    	ctrl.SaveformatName = "jpeg";
	Response.BinaryWrite(ctrl.SendBinary());

	ctrl=null;
//where image is binary data which can be used in <img> without any problem.

But no luck

Thanks
Babar Shafiq

Re: Dynamic image merging

Posted: Tue Jun 27, 2006 7:16 am
by xnview
Babar wrote:Hello everyone,

I am rendering images from ASP code and using that image in <img> (working fine) now i want to use GflAx to merge one another image with the rendered image i tried so many combinations but not able to get the merged image not even actull image when i use GflAx.

My Code:-

Code: Select all

       ctrl =Server.CreateObject("GflAx.GflAx");
	ctrl.EnableLZW = 0;
	ctrl.MergeAddFile(imagegen.Render(), 10, 0, 0); /*where imagegen is a module which is generating map images in PNG format*/
	ctrl.MergeAddFile ("arrow.png", 15, 0, 0);
	//ctrl.LoadBitmap(mapserver.Render());
	//ctrl.DrawLine(0,0,100,100);
	ctrl.Merge();
                ctrl.SaveformatName = "jpeg";
	Response.BinaryWrite(ctrl.SendBinary());
	ctrl=null;		
It is possible to use GflAx for that purpose ? and how to do that task ? i m getting missing image when i tried above code with my existing code.

What might be the reason ? any clue ?

Thanks
Babar Shafiq.
Please, send your pictures, and what you want to make?