473,624 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

showing ASP.NET thumbnails

Hello friends, i have a directory in which my uploaded images are stored i
want to create thumnails of these images dynamically and show these thumbnail
how can i do this pls tell me about that.
Thanks
Nov 19 '05 #1
2 1037
Hi, asad,

Here's 3 links to online code for generating thumbnails.

http://www.dotnetjunkies.com/HowTo/C...8DBEC7F25.dcik

http://authors.aspalliance.com/chris...iew-image2.asp

http://www.mcse.ms/archive109-2003-11-80290.html

You might also want to download and examine the free
Community Starter Kit. It has a thumbnail-generation module :

http://www.asp.net/StarterKits/Downl...ndex=0&tabid=1


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======

"asad" <as**@discussio ns.microsoft.co m> wrote in message
news:5D******** *************** ***********@mic rosoft.com...
Hello friends, i have a directory in which my uploaded images are stored i
want to create thumnails of these images dynamically and show these
thumbnail
how can i do this pls tell me about that.
Thanks

Nov 19 '05 #2
You can resize the image using the GetThumbnailIma ge method.
Here's more info:
http://msdn.microsoft.com/library/de...ImageTopic.asp

Or maybe you'll find these custom functions useful that I wrote:

public Image DisplaySize(Bit map bmp)
{
Response.Write( bmp.Width.ToStr ing());
Response.Write( bmp.Height.ToSt ring());
}

//shrink the image proportionately so that neither height nor width is more
than [NewSize] pixels

public System.Drawing. Image ShrinkImage(Sys tem.Drawing.Bit map bmp, int
NewSize)

{

double NewWidth;

double NewHeight;

double ShrinkPercent;

System.Drawing. Image.GetThumbn ailImageAbort myCallback =

new System.Drawing. Image.GetThumbn ailImageAbort(T humbnailCallbac k);

if (bmp.Width>bmp. Height)

{

NewWidth=NewSiz e;

ShrinkPercent=( NewWidth/bmp.Width)*100;

NewHeight=(Shri nkPercent/100)*bmp.Height ;

}

else

{

NewHeight=NewSi ze;

ShrinkPercent=( NewHeight/bmp.Height)*100 ;

NewWidth=(Shrin kPercent/100)*bmp.Width;

}

System.Drawing. Image myShrunkenImage =
bmp.GetThumbnai lImage((int)New Width,(int)NewH eight,myCallbac k,IntPtr.Zero);

return myShrunkenImage ;

}

public bool ThumbnailCallba ck(){return false;}

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"asad" <as**@discussio ns.microsoft.co m> wrote in message
news:5D******** *************** ***********@mic rosoft.com...
Hello friends, i have a directory in which my uploaded images are stored i
want to create thumnails of these images dynamically and show these
thumbnail
how can i do this pls tell me about that.
Thanks

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5187
by: Lemming | last post by:
Hi, I'm putting together a website for a local estate agent. One of the things they want to do is upload property descriptions/prices/etc. plus a picture of the property which is for sale.
5
3665
by: Ken | last post by:
I am in the process of designing my first web-site, and am having a problem with my picture gallery. My thumbnails are all different sizes, I would like them to be one size. The manual does not address this situation. Where did I go wrong?
3
11397
by: Vagabond Software | last post by:
I'm trying to display thumbnail images in a Listview that look more like the Windows thumbnail view. Everything is working pretty good, but my thumbnails are decidedly not like the Windows thumbnails. View the following snapshot to compare the Windows thumbnails (top) to my ListView thumbnails (bottom): http://home.san.rr.com/vagabondia/images/tmp/sample.gif It looks like the Windows thumbnails retain their proportion by, perhaps,
2
1196
by: Carl Gilbert | last post by:
Hi I am developing a site that has 5 or 6 thumbnail pages each with 28 image on each. Each thumb nail has a matching larger image. So 5/6 groups of 28. When the user clicks on one of the images, I want to load up another page showing the selected full size image. I then want to provide the ability to move back and forward through the collection of images.
6
4742
by: Rich | last post by:
Hello, I want to simulate the dynamic thumbnail display of Windows Explorer (winxp) on a form or pannel container. If I place a picture box on my container form/pannel and dimension it to the size of a thumbnail and set the sizemode to Stretch -- I get one thumbnail. I want to retrieve all the picture files (jpg, bmp) in a directory into an array list and then display this list as thumbnails on my form dynamically. So my question is...
4
1766
by: Barely Audible | last post by:
Guys I was wondering if it was possible to have a js file that, when the page loaded, it automatically generated a a set of thumbnails from directory of the page on the web server? Or would this create an unacceptable security hazard? TTFN Barely
5
1985
by: JJ | last post by:
I have a gallery-like application. (The gallery will be actually presented in Flash, but the management (cms) of the images will be in asp.net. ) My question is, is it ok to create Thumbnail images on the fly by resizing the original sending it to the output stream (i.e. Response.ContentType = "image/jpeg"; Response.BinaryWrite(imageContent) ), or best to actually save the thumbnails to disk. Would this method result in a much slower...
1
1149
by: iswar | last post by:
hi friends asp.net(2.0) c# i am trying to create an image gallery in which all the uploaded image are converted into thumbnails and i want to bind these thumbnails into gridview. and on clicking in this thumbnails displayed in grid the orginal image is shown in a pop-up. now i hav succeded in creating thumbnails from uploaded images pls any one help me how to bind these thumbnails in gridview by storing it in a folder.. thanks a lot for...
3
2843
by: maya | last post by:
www.francesdelrio.com/photoblog_c/section1/page2/photos.jsp right on top and right underneath thumbnails are background-images (the "up" and "down" arrows), but they're not showing in FF on the mac (FF/pc is fine) or Safari.. I HAVE to do these links with bg-images b/c of the diff color-schemes I have, among which the user can choose... (there's a lot of code here.. is generated with JSP....;)
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.