Thread: Resized image
View Single Post
  #1 (permalink)  
Old October 12th, 2010, 08:38 AM
itHighway itHighway is offline
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Resized image

Hello,

I have very basic knowledge of ASP.net. I am using following script to resize and image, but the problem is it increases the disk volume of resized image to almost 4 times or original image.

Example:
Original Image: 1024 x 769px and Disk space: 135 KB
Resized Image: 600 x 380px and Disk space: 725KB


HTML Code:
	 dim g1 as System.Drawing.Image = System.Drawing.Image.FromFile(txtGetImage)  
	 dim thisFormat1=g1.rawformat  

	 '#600
     height = g1.Height / (g1.Width / 600)
			 
	 dim imgOutput1 as New Bitmap(g1, 600, height)  
	 imgOutput1.Save(txtMedium)
         g1.dispose()
	 imgOutput1.dispose()  

Any idea, any help will be greatly appriciated.


Thanks!
Reply With Quote