image and image


// create an image object, using the filename we just retrieved

System.Drawing.Image image = System.Drawing.Image.FromFile(Server.MapPath(file));

// create the actual thumbnail image

System.Drawing.Image thumbnailImage = image.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);

 

now my question is how to display this image in my image1 control in asp.net (version 1.1)

the below line of code is not working. 

Image1.ImageUrl=thumbnailImage.ToString();


Mark As Answer If my reply helped you.
0
syedwna
8/8/2007 6:35:16 AM
asp.net.drawinggdi 1803 articles. 0 followers. Follow

2 Replies
1276 Views

Similar Articles

[PageSpeed] 31

Hi,

you can save the image to thumb folder then make the image control url property to the thumb file


Regards,
Hossam El-Deen M. Barakat
Microsoft Certified Technology Specialist(Web, Windows)
Blog: http://HossamElDeen.blogspot.com
0
Hossam_El_Deen
8/8/2007 9:07:46 AM

You need to do this:

thumbnailImage.Save(WorkingDirectory + "\imagename.jpg" , ImageFormat.Jpeg);
thumbnailImage.Dispose();
Image1.ImageUrl= WorkingDirectory + "\imagename.jpg"; //example: C:\folder\image.jpg

Good Luck 

Utiq 

0
Utiq
8/8/2007 4:34:17 PM
Reply:

Similar Artilces:

Image on Image
I am trying to display a page that has image of a map on it. The user can then place other images of red thumbtacks on the image at different locations. Then when these thumb tacks are clicked on, they open a folder of pics related to the area. I saw a method in the imageButton class that returns the (x,y) of the location where the user clicked. I thought I could use this information to place another, smaller image button, on that area. My problem is that i can't seem to get the bottom imageButton to be transparent so I can see the smaller one. Am i on the right track with this. Any advi...

Imaging, but not imaging
We multicasted to 43 machines. Updated the image on the master. Multicasted the updated image to 36 machines. (the other 7 wouldn't join the session for some unknown reason). I visually verified that all 36 were imaging. One of the 8 which didn't rename appears to not even have been imaged. The problems with the previous image were still there. It's as though the machine didn't image even though I saw it take part in the session and the temp bar going across the screen. What the heck's going on here? AlaN As a try, what happens if you boot either to PXE ...

Image in image
Hi, I have a project where clients viewing my website can buy t-shirts. They can choose from a number of t-shirt colors and shapes which are their plain colour. They can also choose a number of prints to be placed on the t-shirt. These will be graphics stored in a database. My problem is on how I can displaty the t-shirt with the graphics or logo they chose on te t-shirt. It would be something like drawing text on an image but instead drawing an existing image on the base image. Any Ideas? (I am using visual studio 2005 and vb.NET)   RegardsMerovingian you 1. You can create a...

display image in a image image button
hi   i have to display an image in image button while uploading mycode Image1.ImageUrl = Upload.PostedFile.FileName; is not working thanks Hi You need to save the PostedFile to the disk on the server and then assign it to ImageUrl. Take a look at the following links for more infoprmation on how to do this.  http://www.codeproject.com/KB/aspnet/netimageupload.aspx http://www.stardeveloper.com/articles/display.html?article=2003022601&page=1Reza Nassabehwww.professionalcsharp.comDon't forget to click "Mark as Answer" on the post that helped you. That way ...

ADO.net problem: i can not view image data for the rest of my table rows except the image for the first row but i can read all the other non image fields for all rows.
Hi i have a table with the following fields imgid............int imgdata........image imgtitle.........varchar(max) imgType........varchar(max) imgLength.....bigint incident_id.....int i have no problem with uploading the image but viewing the uploaded image(s) in a gridview has caused me great pain. The probelm is i have two pages. page1 grabs the image to display and page2 has a gridview that displays the grabed image. I wanted to have an sql statement like SELECT * FROM mytable WHERE incident_id=someValue. IF i have 5 records in this table and i view page2 ...

Displaying image from database(image datatype) to image control
Hie all...I'm a newbie at asp.net. I m currently using asp.net 2.0.I m having a problem with displaying images on my web form. Have tried looking thru all codes but i can't find a step by step tutorial for doing so. I understand that in asp.net 1.1, the detailsview can automatically be linked to the image field and display the image. But this is not possible now. So, i have decided to just display the image in an image control.from my understanding, 1. retrieve image from database and convert it to temporary image file in a file path. 2. use the image control's imageurl to point to the file....

Display image from image
Let me explain more. I have a Gridview, that displays an image.  Then i have a detailsview displaying an image from the selected value in the gridview.  Simple.  When i click on one of the images from the gridview, it displays the correct image in the detailsview.  Basically, i have two images in each row of the table in the database.The only way this works is if i have "autogenerateselectbutton=true" set.  I do not want the select link next to my image.  I want to be able to pick on the image in the GridView, and have it show the correct image in...

How can set an image from SystemDrawing.Image into WebControls.Image?
I want directly to set an image from SqlServer to the webform. Do you know how to do it ? please tell me. In the window form I saw a method to set an image from SqlServer: byte[] imgData=(byte[])dr["PictureFile"] // dr is SqlDataReader when call data from SqlServer MemoryStream ms = new MemoryStream(imgData); PictureBox1.Image = System.Drawing.Image.FromStream(ms); ms.Close(); but I have not yet seen any method set an image from SqlServer to WebForm. Have you seen it please tell me, thanks. ...

how to superimpose image over image
Hi,   Could please you please tell me how to solve this problem,    I have Category and products, after selecting category and products,     I am display product Image and also I am giving aspx file upload control to upload logo and display logo on middle of the product image    User will select image and click on submit button. Then uploaded logo should be in    Middle of the product image    Example (if product image width 200 and height 200) and then uploaded image should be placed center&...

Image in Image Frame
Name: Winbinar Product: Firefox Summary: Image in Image Frame Comments: I usually do surfing in Internet with disabled option "show pictures". But I sometimes want a look to the picture. I do right click on the picture and select "Show Picture". Browser shows only this picture. Why you didn't this possibility as in Internet Explorer? Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9b1) Gecko/2007110904 Firefox/3.0b1 ...

display image in Gridview from sql image in .Net 2005
Hi all, I need to Display the Image directly from SQL Database in the GridView as Thumnails. This i can do in .Net 2003 with Help of ItemDatabound Event and Template Column. But in the .Net 2005 there no ItemDatabound event in GridView. For Example I need to Show it like this:  Help Me ASAP.Tamil See :http://www.beansoftware.com/ASP.NET-Tutorials/Images-Database.aspxHope this helps. Vikram.S, DeveloperDiscountASP.NETInnovative ASP.NET Hosting & SQL Hosting Thanks a lot Sharma. It was very useful.  Tamil...

Save Image Path into Database, Retrieve Image Path by Particular Image ID and Display Image through Gridview
Hi All, Currently, I have a file upload control in my aspx page to allow user to upload images. When the user clicks the SAVE button, the image will be saved in a particular folder named 'PMap' that located within the website. What I am trying to do here is to direct all uploaded images into a common image folder (in this case 'PMap') and then, retrieve the images and displayed it through a Gridview according to its respective image id. I have managed to store all uploaded images into a common image folder, PMap. However, I hope advice can be given on my following pro...

vb.net image.databind, Image does not show on front end
Hi Guys,its the first time I am working with images so I was confused not to actually see my image altough the URL is correct (if I paste it in seperately in the browser it shows).all I do is: ImageOfAlternative.ImageUrl =  myurl.comImageOfAlternative.DataBind()ImageOfAlternative.Focus()Any ideas?  So when you run your website, it shows the "x" picture?Have you checked the properties of the broken image? See where it's pointing to? Microsoft ASP.NET Enthusiast the http:// was missing!...

Creating Thumbnail Images
Hi all, I have a script that uploads an image and creates a thumbnail for it. Ideally this thumbnail would be a smaller filesize but this is not what is happening. I have just uploaded a few images one of which was 378x521px and 11.3Kb. The thumbnail image created from this was 145x200 and 55.5Kb! Can anyone please tell me what I am doing wrong. I am using the GetThumbnailImage method as such:  System.Drawing.Image myThumbnail = myBitmap.GetThumbnailImage(intThumbWidth, intThumbHeight, myCallBack, IntPtr.Zero);myThumbnail.Save (Server.MapPath(sSavePath + sThumbFile)); Many thank...

Web resources about - image and image - asp.net.drawinggdi

Twist Image
At Twist Image, we connect brands to people and people to brands. Let us show you what we mean.

Wikipedia:Manual of Style/Images - Wikipedia, the free encyclopedia
Wikipedia contains millions of illustrative images and other electronic media . This page gives a very brief overview of how images are used ...

LG’s six-day-old smartwatch canceled due to “image quality issues”
... hours under severe conditions, it was revealed that this component failed to meet LG’s quality standards and could potentially impact our image ...

Adele has an awesome take on body image
In an interview with SiriusXM's Jenny Eliscu , Adele talked about her philosophy on body image issues. Her overall outlook is simple: embrace ...

“Gal Gadot reveals the first image from the ‘Wonder Woman’ movie” links
The first photo of Gal Gadot from the stand-alone Wonder Woman movie. [Dlisted] Did Nicki Minaj side-eye Jennifer Lopez’s “Anaconda” performance? ...

Struggling to Find Free Images? Check Out VisualHunt
As you probably know, adding images to your website or blog is essential to make it popular over time. Not only will the images make your content ...

‘The Man In The High Castle’ Ad Campaign Puts Nazi Images On NYC Subway Cars
Based on the Philip K. Dick novel, Amazon ’s new drama series The Man in the High Castl e imagines a world in which the Axis powers won World ...

Here's Why The Entrepreneurial Image Is Mostly Smoke And Mirrors
What are some assumptions that people make about successful entrepreneurs that aren't necessarily true? This question was originally answered ...

Enjoy an Endless a Day On Charon in This Gorgeous Composite Image
As the New Horizons spacecraft approached Pluto this summer, it sent back photos from all angles, allowing us to reconstruct an entire day on ...

Mizzou Facing Image Crisis After Racial Issues, Upheaval
Missouri facing damaged image, reputation following protests over handling of racial issues

Resources last updated: 11/25/2015 10:11:32 AM