Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 28, 2013 09:13 AM by RSMakadia
Apr 02, 2010 06:03 AM|LINK
In my Web application, iam displaying images. I want to convert an image of type(BMP,TIF etc.,) to JPG and highlight(Drawing transparent Rectangles on the Image )the portion of the image and display it on web page. How can i acheive this with asp.net &
Thanks & Regards
Roopesh Reddy C
Apr 02, 2010 07:36 AM|LINK
check the following urls for image operations in asp.net,
Apr 02, 2010 11:44 AM|LINK
It didn't helped me.. Iam able to convert the TIFF images to PNG/JPG. Now when i try to draw rectangles, i mean if i instantiate the
Graphics class, it is throwing "a graphics object cannot be created from an image that has an indexed pixel format" exception?
Apr 05, 2010 06:33 AM|LINK
public static void ResizeStream(int imageSize, Stream filePath, string outputPath)
var image = Image.FromStream(filePath);
int thumbnailSize = imageSize;
int newWidth, newHeight;
if (image.Width > image.Height)
newWidth = thumbnailSize;
newHeight = image.Height * thumbnailSize / image.Width;
newWidth = image.Width * thumbnailSize / image.Height;
newHeight = thumbnailSize;
var thumbnailBitmap = new Bitmap(newWidth, newHeight);
var thumbnailGraph = Graphics.FromImage(thumbnailBitmap);
thumbnailGraph.CompositingQuality = CompositingQuality.HighQuality;
thumbnailGraph.SmoothingMode = SmoothingMode.HighQuality;
thumbnailGraph.InterpolationMode = InterpolationMode.HighQualityBicubic;
var imageRectangle = new Rectangle(0, 0, newWidth, newHeight);
Color color = Color.FromArgb(50, 255, 255, 255);
SolidBrush brush = new SolidBrush(color);
Point atPoint = new Point(10, 10);
Pen pen=new Pen(brush);
Apr 05, 2010 02:35 PM|LINK
Thanks for ur help. I had solved my problem using GDI+ classes in .NET.
I used Bitmap Class to create a bitmap and Graphics class to draw the shapes on the images
Thanks & Regards
May 28, 2010 03:18 PM|LINK
How I can capture a portion(rectangle) by cordinates or dimensions from an image or from web page?
Please suggest me the proper way.
Jun 24, 2010 01:27 PM|LINK
Were you able to sort out the problem.
I also need something like that.
Feb 28, 2013 09:11 AM|LINK
Can any one help me to draw shapes on image with Mouse movements ?
Feb 28, 2013 09:13 AM|LINK
Did you able to make shapes on images ? I want to achive same kind of thing in my web application. Can you help me ?