new Bitmap(String fileName) : Bitmap « System.Drawing « C# / C Sharp by API






new Bitmap(String fileName)

  

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

public class Form1 : Form {

    protected override void OnPaint(PaintEventArgs e) {
    Graphics g = e.Graphics;
    Bitmap bmp = new Bitmap("rama.jpg");

    Rectangle r = new Rectangle(0, 0, bmp.Width, bmp.Height);
    g.DrawImage(bmp, r, r, GraphicsUnit.Pixel);
    }
    public static void Main() {
        Application.Run(new Form1());
    }
}

   
    
  








Related examples in the same category

1.Bitmap.CompositingMode
2.Bitmap.Height
3.Bitmap.HorizontalResolution
4.Bitmap.MakeTransparent( );
5.Bitmap.PhysicalDimension
6.Bitmap.PixelFormat
7.Bitmap.RawFormat
8.Bitmap.SetResolution(600f, 600f);
9.Bitmap.Size
10.Bitmap.Width