Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Default Image Variation

Posted 25 Feb 2004 03:12:14
1
has voted
25 Feb 2004 03:12:14 Charles Knight posted:
I used the following statement to show a default image if one is'nt present:

Dim PicStore1
if recordset1.Fields.Item("image1".Value <> "" then
PicStore1 = recordset1.Fields.Item("image1".Value
Else
PicStore1 = "../images/nopic.jpg"
End if

Then in the cell where I want the image I to appear I place an image with the size set to say 128x96 and the scr set to:

<%= picstore1%>

and a link a another page sorted by ref no etc...

All works really well and I can't fault it apart from the fact the image shown is just a reduced version of the full size image. I know this will slow down the page as I have about ten images on one page.

I used aspupload, is there a way to alter the dim statement so that it looks for the "_small" image smart image processor produces ?

The scr line this would produce normally would be:

<%= Thumbnail("_small",(recordset.Fields.Item("image1".Value)) %>

Many thanks for looking at this problem
regards
ck

Replies

Replied 29 Feb 2004 02:08:50
29 Feb 2004 02:08:50 Phil Shevlin replied:
I'm not entirely sure what you're saying, but I think you are wanting to apend _small to the filename.

<pre id=code><font face=courier size=2 id=code>&lt;%=Replace(rs.Fields.Item("image1".Value, ".jpg", "_small.jpg"%&gt; </font id=code></pre id=code>(assuming its a jpeg.)
Replied 02 Mar 2004 06:06:17
02 Mar 2004 06:06:17 Charles Knight replied:
Sorry for not making sence.
The Dim picstore sequence is all directed to, in my case image1, which is a colum in my database where aspupload stores the path to the uploaded file. Smart Image Processor also creates a thumbnail and names the file whatever_small.jpg but does not put an entry into the database. I guess there is a line in one of the include files that aspupload creates that tells it where the thumbnail is.
And so my problem.
I only know how to direct the Dim statement towards the full size image, what I want it to do is show the thumnail version whereever I want it on the page and then I'll hyperlink to the full size version from there.
Think thats sort of explains it
Many thanks anyhow for your reply, I at least now what the Replace command does..
Replied 02 Mar 2004 13:54:24
02 Mar 2004 13:54:24 Phil Shevlin replied:
Sorry, I still think replace is your answer. Since you are talking about specific extensions, you should direct your questions on their support forums:

www.dmxzone.com/forum/default.asp?NewsId=1622

Reply to this topic