Bitmap

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/33

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:16 AM on 8/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

34 Terms

1
New cards

Bitmap

A class in the System.Drawing namespace that represents a raster image composed of pixels and provides operations for creating, loading, manipulating, and saving bitmap images. Domain: C# → .NET → System.Drawing → Raster Image Representation & Manipulation

2
New cards

Bitmap image = new Bitmap(800, 600);

Creates an empty bitmap that is 800 pixels wide and 600 pixels high.

3
New cards

Bitmap image = new Bitmap(800, 600, PixelFormat.Format32bppArgb);

Creates a bitmap with the specified width, height, and pixel format; this example uses a 32-bit ARGB pixel representation.

4
New cards

Bitmap image = new Bitmap("photo.png");

Loads a bitmap image from the specified image file.

5
New cards

Bitmap copy = new Bitmap(image);

Creates a new Bitmap from an existing Image object.

6
New cards

Bitmap resized = new Bitmap(image, 400, 300);

Creates a new Bitmap from an existing image and scales it to the specified width and height.

7
New cards

int width = image.Width;

Gets the width of the bitmap in pixels.

8
New cards

int height = image.Height;

Gets the height of the bitmap in pixels.

9
New cards

Size size = image.Size;

Gets the width and height of the bitmap together as a Size structure.

10
New cards

Color color = image.GetPixel(x, y);

Gets the Color of the pixel located at the specified x and y coordinates.

11
New cards

image.SetPixel(x, y, Color.Red);

Sets the pixel at the specified x and y coordinates to the specified Color.

12
New cards

image.Save("output.png");

Saves the bitmap to the specified file.

13
New cards

image.Save("output.png", ImageFormat.Png);

Saves the bitmap to a file using the PNG image format.

14
New cards

image.Save("output.jpg", ImageFormat.Jpeg);

Saves the bitmap to a file using the JPEG image format.

15
New cards

PixelFormat format = image.PixelFormat;

Gets the pixel format that describes how color information is stored for each pixel in the bitmap.

16
New cards

ImageFormat format = image.RawFormat;

Gets the original or raw image format associated with the image, such as PNG, JPEG, or BMP.

17
New cards

float horizontal = image.HorizontalResolution;

Gets the horizontal resolution of the bitmap in dots per inch (DPI).

18
New cards

float vertical = image.VerticalResolution;

Gets the vertical resolution of the bitmap in dots per inch (DPI).

19
New cards

image.SetResolution(300, 300);

Sets the horizontal and vertical resolution metadata of the bitmap to 300 DPI without changing its pixel dimensions.

20
New cards

image.MakeTransparent();

Makes the bitmap's default transparency color transparent.

21
New cards

image.MakeTransparent(Color.White);

Makes pixels matching the specified color transparent.

22
New cards

Bitmap copy = image.Clone(rectangle, image.PixelFormat);

Copies the specified rectangular region of the bitmap into a new Bitmap using the specified pixel format.

23
New cards

BitmapData data = image.LockBits(rectangle, ImageLockMode.ReadWrite, image.PixelFormat);

Locks a region of bitmap pixel data in memory for direct, lower-level, and potentially faster pixel access.

24
New cards

image.UnlockBits(data);

Unlocks bitmap data that was previously locked with LockBits().

25
New cards

IntPtr pointer = data.Scan0;

Gets a pointer to the first byte of the locked bitmap data in memory.

26
New cards

int stride = data.Stride;

Gets the number of bytes between the beginning of one scan line of bitmap data and the beginning of the next.

27
New cards

image.RotateFlip(RotateFlipType.Rotate90FlipNone);

Rotates the bitmap by 90 degrees without flipping it; other RotateFlipType values can specify different rotations and flips.

28
New cards

image.Dispose();

Releases the resources associated with the Bitmap.

29
New cards

using Bitmap image = new Bitmap("photo.png");

Creates a Bitmap that is automatically disposed when execution leaves its scope.

30
New cards

Raster Image

An image represented as a rectangular grid of individual pixels.

31
New cards

Pixel

The individual picture element of a raster image that stores color information for one position in the image.

32
New cards

Pixel Format

The organization and number of bits used to represent each pixel's color information, such as a 32-bit format containing alpha, red, green, and blue channels.

33
New cards

DPI

Dots Per Inch; resolution metadata describing an image's intended physical pixel density. Changing DPI does not by itself change the bitmap's pixel dimensions.

34
New cards

Stride

The number of bytes between the beginning of one bitmap scan line and the beginning of the next row in memory, which may include padding beyond the visible pixel data.