Last post Feb 28, 2013 05:13 AM by RSMakadia
Apr 02, 2010 02:03 AM|roopeshreddy|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 03:36 AM|gopalanmani|LINK
check the following urls for image operations in asp.net,
Apr 02, 2010 07:44 AM|roopeshreddy|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 02:33 AM|Vipindas|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 10:35 AM|roopeshreddy|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 11:18 AM|bhupendra TG|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 09:27 AM|mail2rit|LINK
Were you able to sort out the problem.
I also need something like that.
Feb 28, 2013 05:11 AM|RSMakadia|LINK
Can any one help me to draw shapes on image with Mouse movements ?
Feb 28, 2013 05:13 AM|RSMakadia|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 ?