Forums
This topic is locked
Dynamically Resize Images
Posted 08 Aug 2002 00:44:13
1
has voted
08 Aug 2002 00:44:13 Dan Berdusco posted:
I Know that there have been several posts about this before, but I cannot find a solid response. Here is my issue: I would like to create a photo gallery that will only use one image to make both the thumbnail and the full size view. I can easily set the width of the picture that I use in the thumbnail view to a maximum of say, 100 pixels, and it will keep the image proportions intact. Then When I Click on the picture, I can view the picture on a detail page at full size. But the problem is, the images in the thumbnail view may be smaller in pixel size, but they are still the exact same file size. Meaning that someone with a 56k modem, wanting to look at the thumbnail gallery, is actually downloading the full size image and veiwing it at a smaller pixel size. This is a problem because I plan on placing several images in the gallery and it will be a huge download for modem users.<b>Question:</b> Is there any way to not only change the pixel size of an image, but also the file size? ANY suggestions would be appreciated.
Thanks
Replies
Replied 08 Aug 2002 03:07:12
08 Aug 2002 03:07:12 Owen Eastwick replied:
In a one word answer - NO.
Best way is the long way unfortunately, have 2 copies of each image one small, one large, store them in an image directory. If you are using a database, perhaps storing product details, just store the Image Name in the database and use this to display the relevant image with the text details:
For Example, in the database:
ProductName
ProductDescription
SmImage - Prod01Sm.jpg
SmImageWidth - 100
SmImageHeight - 65
LaImage - Prod01La.jpg
LaImageWidth - 500
LaImageHeight - 325
Display the image:
<img src="ProdImages/<%= RecordsetName.Fields.Item("SmInmage".Value %>" width="<%= RecordsetName.Fields.Item("SmInmageWidth".Value %>" height="<%= RecordsetName.Fields.Item("SmInmageHeight".Value %>" Alt="<%= RecordsetName.Fields.Item("ProductName".Value %>">
In this example I've used the Product Name to dynamically provide the image ALT text.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Best way is the long way unfortunately, have 2 copies of each image one small, one large, store them in an image directory. If you are using a database, perhaps storing product details, just store the Image Name in the database and use this to display the relevant image with the text details:
For Example, in the database:
ProductName
ProductDescription
SmImage - Prod01Sm.jpg
SmImageWidth - 100
SmImageHeight - 65
LaImage - Prod01La.jpg
LaImageWidth - 500
LaImageHeight - 325
Display the image:
<img src="ProdImages/<%= RecordsetName.Fields.Item("SmInmage".Value %>" width="<%= RecordsetName.Fields.Item("SmInmageWidth".Value %>" height="<%= RecordsetName.Fields.Item("SmInmageHeight".Value %>" Alt="<%= RecordsetName.Fields.Item("ProductName".Value %>">
In this example I've used the Product Name to dynamically provide the image ALT text.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 08 Aug 2002 19:19:22
08 Aug 2002 19:19:22 Dan Berdusco replied:
Oh, come on... there has got to be an answer to this. There is ALWAYS a way!
Replied 09 Aug 2002 11:08:13
09 Aug 2002 11:08:13 Iain Stewart replied:
As said above, there is no answer to this, sorry. At the end of the day you are still down loading the large image full size and file size and just making the image smaller in the web browser, so it is still just the large image you are viewing, like said above only way round it is to make 2 images in your graphics program, one full size and one small thumbnail, your grphics package will reduce its file size but a web browser wont.
Iain
head hurts, 'mental note to self, stop banging head !'
Iain
head hurts, 'mental note to self, stop banging head !'
Replied 09 Aug 2002 12:10:16
09 Aug 2002 12:10:16 Owen Eastwick replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Oh, come on... there has got to be an answer to this. There is ALWAYS a way!
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
You're probably right, when you've found it, patent it and you'll be a rich man - good luck. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Oh, come on... there has got to be an answer to this. There is ALWAYS a way!
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
You're probably right, when you've found it, patent it and you'll be a rich man - good luck. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 09 Aug 2002 16:44:44
09 Aug 2002 16:44:44 Dan Berdusco replied:
<font face='Verdana'>I "borrowed" this code from another site and used it on my server. It is pretty cool. - Try uploading a single picture, then check out the file size difference between the thumbnail and the actual image. It even adds a bevel (oooh)!
www.kointeractive.com/gallery</font id='Verdana'>
www.kointeractive.com/gallery</font id='Verdana'>
Replied 09 Aug 2002 18:37:16
09 Aug 2002 18:37:16 David Hayes replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<font face='Verdana'>I "borrowed" this code from another site and used it on my server. It is pretty cool. - Try uploading a single picture, then check out the file size difference between the thumbnail and the actual image. It even adds a bevel (oooh)!
www.kointeractive.com/gallery</font id='Verdana'>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
So how exactly does this work? I see a lot of javascript? How is this being done?
Thanks,
fliquid
<font face='Verdana'>I "borrowed" this code from another site and used it on my server. It is pretty cool. - Try uploading a single picture, then check out the file size difference between the thumbnail and the actual image. It even adds a bevel (oooh)!
www.kointeractive.com/gallery</font id='Verdana'>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
So how exactly does this work? I see a lot of javascript? How is this being done?
Thanks,
fliquid
Replied 11 Aug 2002 07:02:49
11 Aug 2002 07:02:49 Tony Barnhill replied:
I see that you're using asp upload to do the upload, what are you using to do the resize?
Thanks,
Thanks,
Replied 19 Oct 2006 22:48:26
19 Oct 2006 22:48:26 peter b replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Oh, come on... there has got to be an answer to this. There is ALWAYS a way!
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
There is an answer...Use FlashPaper and create a dynamic SWF file.
Or, perhaps you can load the image, ONCE, as FULL SIZE, display it as a thumbnail that is say, 100px x 100px. Then when you click on it, you'll see the full size which has already loaded. You preload all images using an image preloader. The thumbs are the actual images. Then in turn your hyperlink performs a window.open() command taking with it the name of the image passing it and dynamically building a popup.
Get it??? Drop me a line for an example.
Peter
www.webparity.net
Oh, come on... there has got to be an answer to this. There is ALWAYS a way!
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
There is an answer...Use FlashPaper and create a dynamic SWF file.
Or, perhaps you can load the image, ONCE, as FULL SIZE, display it as a thumbnail that is say, 100px x 100px. Then when you click on it, you'll see the full size which has already loaded. You preload all images using an image preloader. The thumbs are the actual images. Then in turn your hyperlink performs a window.open() command taking with it the name of the image passing it and dynamically building a popup.
Get it??? Drop me a line for an example.
Peter
www.webparity.net