|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
Bitmap, classe
Espace de noms : System.Drawing
Assembly : System.Drawing (dans System.Drawing.dll)
Le type Bitmap expose les membres suivants.
| Nom | Description | |
|---|---|---|
![]() | Bitmap(Image) | |
![]() | Bitmap(Stream) | |
![]() | Bitmap(String) | |
![]() | Bitmap(Image, Size) | |
![]() | Bitmap(Int32, Int32) | |
![]() | Bitmap(Stream, Boolean) | |
![]() | Bitmap(String, Boolean) | |
![]() | Bitmap(Type, String) | |
![]() | Bitmap(Image, Int32, Int32) | |
![]() | Bitmap(Int32, Int32, Graphics) | |
![]() | Bitmap(Int32, Int32, PixelFormat) | |
![]() | Bitmap(Int32, Int32, Int32, PixelFormat, IntPtr) |
| Nom | Description | |
|---|---|---|
![]() | Flags | |
![]() | FrameDimensionsList | |
![]() | Height | |
![]() | HorizontalResolution | |
![]() | Palette | |
![]() | PhysicalDimension | |
![]() | PixelFormat | |
![]() | PropertyIdList | |
![]() | PropertyItems | |
![]() | RawFormat | |
![]() | Size | |
![]() | Tag | |
![]() | VerticalResolution | |
![]() | Width |
| Nom | Description | |
|---|---|---|
![]() | Clone() | |
![]() | Clone(Rectangle, PixelFormat) | |
![]() | Clone(RectangleF, PixelFormat) | |
![]() | CreateObjRef | |
![]() | Dispose() | |
![]() | Equals(Object) | |
![]() ![]() | FromHicon | |
![]() ![]() | FromResource | |
![]() | GetBounds | |
![]() | GetEncoderParameterList | |
![]() | GetFrameCount | |
![]() | GetHashCode | |
![]() | GetHbitmap() | |
![]() | GetHbitmap(Color) | |
![]() | GetHicon | |
![]() | GetLifetimeService | |
![]() | GetPixel | |
![]() | GetPropertyItem | |
![]() | GetThumbnailImage | |
![]() | GetType | |
![]() | InitializeLifetimeService | |
![]() | LockBits(Rectangle, ImageLockMode, PixelFormat) | |
![]() | LockBits(Rectangle, ImageLockMode, PixelFormat, BitmapData) | |
![]() | MakeTransparent() | |
![]() | MakeTransparent(Color) | |
![]() | RemovePropertyItem | |
![]() | RotateFlip | |
![]() | Save(String) | |
![]() | Save(Stream, ImageFormat) | |
![]() | Save(String, ImageFormat) | |
![]() | Save(Stream, ImageCodecInfo, EncoderParameters) | |
![]() | Save(String, ImageCodecInfo, EncoderParameters) | |
![]() | SaveAdd(EncoderParameters) | |
![]() | SaveAdd(Image, EncoderParameters) | |
![]() | SelectActiveFrame | |
![]() | SetPixel | |
![]() | SetPropertyItem | |
![]() | SetResolution | |
![]() | ToString | |
![]() | UnlockBits |
| Nom | Description | |
|---|---|---|
![]() ![]() | ISerializable.GetObjectData |
Remarque |
|---|
Bitmap image1; private void Button1_Click(System.Object sender, System.EventArgs e) { try { // Retrieve the image. image1 = new Bitmap(@"C:\Documents and Settings\All Users\" + @"Documents\My Music\music.bmp", true); int x, y; // Loop through the images pixels to reset color. for(x=0; x<image1.Width; x++) { for(y=0; y<image1.Height; y++) { Color pixelColor = image1.GetPixel(x, y); Color newColor = Color.FromArgb(pixelColor.R, 0, 0); image1.SetPixel(x, y, newColor); } } // Set the PictureBox to display the image. PictureBox1.Image = image1; // Display the pixel format in Label1. Label1.Text = "Pixel format: "+image1.PixelFormat.ToString(); } catch(ArgumentException) { MessageBox.Show("There was an error." + "Check the path to the image file."); } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
