Dynamic image merging

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: helmut, XnTriq, xnview

Post Reply
Babar

Dynamic image merging

Post 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.
Babar

Dynamic image merging

Post 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
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Dynamic image merging

Post 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?
Pierre.
Post Reply