Copy Bitmap from file to another Bitmap region in C# Console Application -


Source file) need to create a bitmap file (target file). I have a method like the following:

  Zero copy (bitmap target file, bitmap sourcefile, int position_x, int page_i) {// copy source file in targetfile (position_x, position_y) }   

I searched but there was no luck. Any ideas on how to do it?

You can use the graphics class in System Drawing .

  using System.Drawing; // Again, public static zero transcript in its class (bitmap target, bitmap source, int x, int y) {graphics g = graphics.frimimage (target); G.DrawImage (source, X, Y); } Public static zero main (string [] args) {bitmap target = (bitmap) bitmapfof file ("bg. Jpg"); Bitmap source = (bitmap) bitmapfof file ("fg.png"); Copy (target, source, 100,50); Copy (target, source, 200,300); Copy (target, source, 500,450); Target.Save ("newBG.jpg"); }    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -