473,769 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show light weight thumbnail of large images

I have an app where users will upload photos to their shopping cart. When
they review their cart I need to include a light weight thumbnail of the
image they uploaded. how can I take the image a user uploaded (PixOfMom.jpg
at 600k) and convert it to a thumbnail and put into the image url of a .net
image control using vb.net 1.1?

Thanks!

--
mo*******@nospa m.com
Nov 18 '05 #1
4 1356
Moondaddy,

System.Drawing. Image.GetThumbn ail is what you need. If you want more detail,
I have an ASP.NET v.1.1 project you can download from my website that uses a
couple of pages to allow a user to upload an image, resize it, and set it's
quality. It does a lot more than what you need here, but if you take a look
at the code you'll see how I'm resizing images and setting their quality
which you can then use to create your thumbnails. All the code on my site is
free.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"moondaddy" <mo*******@nosp am.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I have an app where users will upload photos to their shopping cart. When
they review their cart I need to include a light weight thumbnail of the
image they uploaded. how can I take the image a user uploaded (PixOfMom.jpg at 600k) and convert it to a thumbnail and put into the image url of a ..net image control using vb.net 1.1?

Thanks!

--
mo*******@nospa m.com

Nov 18 '05 #2
Nice sample project Justin. I have a few questions though. I'm confused on
how 'ImageDelivery. aspx' got a reference to the image and also I'm not clear
on exactly what its needed for. When posting back the page, isn't there a
way to set the image url to a variable holding the image data? Also, I'm
using a dataset to hold various session data. Could I just use this dataset
to hold the image data in the same way you used the application.ite m
datatable?

Thanks.
--
mo*******@nospa m.com
"S. Justin Gengo" <sjgengo@aboutf ortunate[no-spam].com> wrote in message
news:10******** *****@corp.supe rnews.com...
Moondaddy,

System.Drawing. Image.GetThumbn ail is what you need. If you want more detail, I have an ASP.NET v.1.1 project you can download from my website that uses a couple of pages to allow a user to upload an image, resize it, and set it's quality. It does a lot more than what you need here, but if you take a look at the code you'll see how I'm resizing images and setting their quality
which you can then use to create your thumbnails. All the code on my site is free.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"moondaddy" <mo*******@nosp am.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I have an app where users will upload photos to their shopping cart. When they review their cart I need to include a light weight thumbnail of the
image they uploaded. how can I take the image a user uploaded

(PixOfMom.jpg
at 600k) and convert it to a thumbnail and put into the image url of a

.net
image control using vb.net 1.1?

Thanks!

--
mo*******@nospa m.com


Nov 18 '05 #3
Hi Moondaddy,

The Application.Ite m is application level shared variables and Sessions are
user based( each client request will has identical session). So I think you
should consider whether the data need to be separate from different users,
if so, you should use Session. Otherwise, Application level variables are
ok. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
George,

Emailing me personally is entirely proper! Feel free to contact me whenever
you want.

I love the link you sent:

http://msdn.microsoft.com/msdnmag/is...4/CuttingEdge/

When I created my image manipulation project I was looking for a multi
browser compatible way of delivering an image to a page dynamically and came
across another sample project that showed how to do so. (I don't recall the
link.) The link you sent looks like a much better way to do so! I'll
probably convert mine to use it.

I'm confused on how 'ImageDelivery. aspx' got a reference to the image and
also I'm not clear on exactly what it's needed for.

ImageDelivery.a spx is being sent an image id in the query string: Dim
ImageGuid As String = Request.QuerySt ring("id")

The Guid is being used when the image is stored in the datatable as the row
key. And that is what is used to retrieve the data and send the changed
image to the page display.

One confusing part of the query string may be the random number I'm tacking
on to it. Internet Explorer on the Mac caches images and doesn't check if
the image has changed from one post to another even if caching is turned
off. So I'm adding on the random number just to change the image's url
enough so that IE on the MAC reloads the new image.

When posting back the page, isn't there a way to set the image url to a
variable holding the image data?

It looks like you answered this one yourself with the link you sent me.

Also, I'm using a dataset to hold various session data. Could I just use
this dataset to hold the image data in the same way you used the
application.ite m datatable?

Yes.

I didn't see any binary data types in the dataset and noticed that you
defined the datatable column like this: ImageTable.Colu mns.Add(New
DataColumn("Opt imizedImage", GetType(Object) )) I'm not sure how that would
translate to a strongly typed dataset column.

Technically this column is a strongly typed data column. It's just of the
top type "Object". You could easily change this to be of type stream or
image. I just wanted the flexibility to store most anything in the column
because when I created this project I wasn't positive which I'd be storing
there.

Sincerely,
--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"moondaddy" <mo*******@nosp am.com> wrote in message
news:uY******** *****@tk2msftng p13.phx.gbl...
Nice sample project Justin. I have a few questions though. I'm confused on how 'ImageDelivery. aspx' got a reference to the image and also I'm not clear on exactly what its needed for. When posting back the page, isn't there a
way to set the image url to a variable holding the image data? Also, I'm
using a dataset to hold various session data. Could I just use this dataset to hold the image data in the same way you used the application.ite m
datatable?

Thanks.
--
mo*******@nospa m.com
"S. Justin Gengo" <sjgengo@aboutf ortunate[no-spam].com> wrote in message
news:10******** *****@corp.supe rnews.com...
Moondaddy,

System.Drawing. Image.GetThumbn ail is what you need. If you want more detail,
I have an ASP.NET v.1.1 project you can download from my website that uses a
couple of pages to allow a user to upload an image, resize it, and set it's
quality. It does a lot more than what you need here, but if you take a

look
at the code you'll see how I'm resizing images and setting their quality
which you can then use to create your thumbnails. All the code on my

site is
free.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"moondaddy" <mo*******@nosp am.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I have an app where users will upload photos to their shopping cart.

When they review their cart I need to include a light weight thumbnail of the image they uploaded. how can I take the image a user uploaded

(PixOfMom.jpg
at 600k) and convert it to a thumbnail and put into the image url of a

.net
image control using vb.net 1.1?

Thanks!

--
mo*******@nospa m.com



Nov 18 '05 #5

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

Similar topics

2
4013
by: jn | last post by:
This is the weirdest thing I've come across in a while. I'm trying to resize an image. If I give it a small image ( < 100K) it will resize. If I give it a larger image, it gives me the IE "Action Cancelled" page. The memory_limit for PHP has been changed to 30MB so that's not the problem. I know that the line with imagecreatefromjpeg() is the problem (even though I can't get an error message). I can run this code with the large images...
3
2722
by: DOK | last post by:
I'm creating an ad for eBay and want to keep the page condensed. I have 6 images - different views of an antique lap steel guitar - that need to show superb detail. I have cropped the images to take up a full webpage width. However, I don't want to put all six images on the page. I thought I could use icons as the trigger for displaying the images one by one. I cropped the six images down to small (but identifiable) icons. Is there...
0
1164
by: bullshark | last post by:
I have a C# application that manipulates images. The application provides the ability to pan around the images. Normally you can "grab" the image and move it around and it moves in real time with the mouse cursor. There is very low friction. It slides easily. My problem is that with larger images, it just turns to mud. Refreshing the image, or re-drawing a screenful take so long that trying to pan the image results in jumpy, jerky...
2
3502
by: xain | last post by:
HtmlString includes a web page, and soon it is converted to Html file. In the web page, they are images, and some of them are large. They are so large, in fact they are going to destroy my Tables, so I need to resize these images. I write a Function to do this job. Resizeimage(HtmlString) Function Resizeimage(ConStr) Dim TempStr,Re,Matches,Match,Tempi,TempArray
2
1596
by: cnote | last post by:
I am trying to upload large images ( around 4 mb) from the server to show on the client. Currently I'm using an http handler to do it and breaking it into chunks sending it 1 mb at a time. Sometimes I'm getting errors, like the page won't load. Any solutions on how this is done right? Thanks for your help.
2
1347
by: cnote | last post by:
I am trying to upload large images ( around 4 mb) from the server to show on the client. Currently I'm using an http handler to do it and breaking it into chunks sending it 1 mb at a time. Sometimes I'm getting errors, like the page won't load. Any solutions on how this is done right? Thanks for your help.
18
1674
by: Diilb | last post by:
Hi All, I am not sure if this is the place to post this. But I am looking for a light weight drag and drop (sortable) library. I have looked around and there are a few good libraries (Script.aculo.us & Dojo), but they are a little heavy and involved considering I am just looking for drag and drop (sortable) functionality. I am open to all suggestions. And thanks for any input.
1
2035
by: John Drako | last post by:
I'm looking for some light-weight, open-source wiki software that I can integrated into my own site, using my own authentication against my own user database. All I would need it to do is handle the editing and track changes by different users. Is there such a thing that you know about?
0
1096
by: Jean-Paul Calderone | last post by:
On Tue, 23 Sep 2008 21:22:08 -0500, Michael Mabin <d3vvnull@gmail.comwrote: You haven't described the problem you want to solve in very much detail. I can't tell, for example, why I shouldn't recommend that you use Apache instead of CherryPy or Twisted or anything else. Apache has a huge user community, lots of documentation, and lots of developers fixing its bugs and making it work well. What are you trying to do that would make...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
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...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
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
8873
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...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.