How resize an image using GDI+
Resizing of images is very important when designing web applications, as you don't really want to have 4 megabyte images displayed on your web pages. Ideally you want to create a thumbnail image of those, and display that. When the user clicks on this image, then display original Image.
How to change the quality of jpeg images using GDI+
Sometimes the standard functions for converting images to jpeg's isn't of a high enough quality. Perhaps you are converting map images or high resolution text documents, where the jpeg artifacts are easily seen.
Create a new bitmap image and draw a line
Many applications require that images are dynamically created especially for the user in websites. I normaly do this when ploting graphs or adding watermarking on images as they are displayed instead of having numerous duplicated saved images on the server.
Add text to a bitmap image using GDI+
Adding text to a bitmap requires you to first select the font to use and the colour of the brush to use. The example below loads in a .png file and adds the text "SOLD".
Rotate an image using GDI+
Rotating an image can be usefull when dynamically adding items to an existing image, such as adding a "SOLD" stamp across a products image.
Convert an image to a byte array.
You should have your image stored in the "myimage" variable, and then use the below code to convert to a .Png format and save into the "mybytearray" array.
Convert a byte array into an image.
The binary array "mybytearray" should contain your image data, then use the below code to convert this into an image usable by VB.Net.
- 1