473,695 Members | 2,754 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 1349
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
4009
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
2718
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
1159
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
3495
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
1590
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
1341
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
1669
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
2032
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
1090
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
8630
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8568
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
9115
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
8982
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...
0
8825
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
7660
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
6491
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
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2272
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.