473,417 Members | 1,459 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

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*******@nospam.com
Nov 18 '05 #1
4 1341
Moondaddy,

System.Drawing.Image.GetThumbnail 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*******@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.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*******@nospam.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.item
datatable?

Thanks.
--
mo*******@nospam.com
"S. Justin Gengo" <sjgengo@aboutfortunate[no-spam].com> wrote in message
news:10*************@corp.supernews.com...
Moondaddy,

System.Drawing.Image.GetThumbnail 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*******@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.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*******@nospam.com


Nov 18 '05 #3
Hi Moondaddy,

The Application.Item 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.aspx is being sent an image id in the query string: Dim
ImageGuid As String = Request.QueryString("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.item datatable?

Yes.

I didn't see any binary data types in the dataset and noticed that you
defined the datatable column like this: ImageTable.Columns.Add(New
DataColumn("OptimizedImage", 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*******@nospam.com> wrote in message
news:uY*************@tk2msftngp13.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.item
datatable?

Thanks.
--
mo*******@nospam.com
"S. Justin Gengo" <sjgengo@aboutfortunate[no-spam].com> wrote in message
news:10*************@corp.supernews.com...
Moondaddy,

System.Drawing.Image.GetThumbnail 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*******@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.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*******@nospam.com



Nov 18 '05 #5

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

Similar topics

2
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...
3
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...
0
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...
2
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,...
2
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. ...
2
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. ...
18
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...
1
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...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.