473,394 Members | 1,714 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,394 software developers and data experts.

ASPImage: bizzare concat issue

Help,

So I'm doing the common make thumbnails script. to save server space, I
don't want to store the thumbnails, so I did the classic break up script.

I parse on the main page where it gathers the folders, files and their
paths, then I pass them over into the sendbinary.asp page which does all the
editing.

First of all this works.

basically the final output creates this:

<IMG
SRC="scripts/sendBinary.asp?path=c%3A%5Csite%5Cafolder%5CDC%5Cb oat%5CIM001693%2EJPG">

but, as you can tell, I'm passing over the full information and it writes
the hard drive information where everyone can see it. I went into trying to
pass two variables to the sendbinary page. I tried storing the path as a
session variable and then just passing the image name. That didn't work
(example below).

Is there a way to combine path information... and or hide it from users? I
even tried to get it to do a mappath while in the sendbinary page and that
didn't work. It seems like something like this would work, but it doesn't.

Could anyone offer some advice? A different plan of attack?

Here are some variations I've tried...

1st the output string:

<IMG SRC="scripts/sendBinary.asp?imgname=IM001693%2EJPG">

also, I created a session variable to track the physical path location:

<%
Session("PhysicalPath") = "c%3A%5Csite%5Cafolder%5CDC%5Cboat%5C"
%>

here's how I've altered the code to try to break it into chunks inside the
sendbinary.asp

<%
Response.ContentType = "image/jpeg"
Set Image = Server.CreateObject("AspImage.Image")

path = Request.QueryString("path")
imgname = Request.QueryString("imgname")
Upath = Session("PhysicalPath")
AllPath = Session("PhysicalPath") & Request.QueryString("imgname")

'Image.LoadImage(path)
'the above works if I remove the quote

Image.LoadImage(AllPath)
'I get red x boxes because it can't find the image.
Image.JPEGQuality = 20

' Set new height and width
Dim intXSize, intYSize, intWSize,intHSize

intWSize = 337
intHSize = 62

'scale image so width of whole image is the same as width of
thumbnail

intXSize = intWSize
intYSize = Image.MaxY * intXSize / Image.MaxX

'resize the image
Image.ResizeR intXSize, intYSize

'crop the image x, y, width, height
Image.cropimage 0,((intYSize+intHSize)/2),intWSize,intHSize

Response.BinaryWrite Image.Image
Set Image = nothing
%>


What am I doing wrong?

Thanks very much,

Kelly
Feb 8 '06 #1
0 1280

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

Similar topics

1
by: Fredo Vincentis | last post by:
Hi guys, this is not really an ASP question, but some of you might have had experience with this and I thought you migth be able to help me. I require the ASP componentn ASPImage for one of my...
0
by: Mohamed Hosam | last post by:
I want to use ASPImage to resize photos and show them to user as thumbnails on the fly (I do not want to save them). Any idea how to achieve this? On their page, they advise me to use...
4
by: Gerald Aichholzer | last post by:
Hello, I need to specify the following attribute in an xhtml-file containing TAL templates: <div tal:attributes="onMouseOver concat('func(',xyz,')')"> which results in <div...
8
by: Doug Stiers | last post by:
Is there a downside to using string.concat? Other than a little overhead? str1 = string.concat(str1,str2) vs. str1 &= str2 It seems to me like the string class should be optimized to do this...
1
by: Trint Smith | last post by:
Ok, I have a webform that has these checkboxes: 1. something 2. something else 3. and something else When the user clicks on the checkbox, I want all of the selections to go into a textbox...
7
by: Martin Pritchard | last post by:
Hi, Sorry for my ignorance, but I'm a bit new to C++. I've been handed over a C++ app written in VS2002 which I have to convert to VS2005. Apparently it's been written in a C style, but cannot...
4
by: Martin Evans | last post by:
Hi, I'm getting: DBD::DB2::db do failed: SQL0440N No authorized routine named "CONCAT" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884 for some SQL like this:
2
by: bigmentor | last post by:
Good Morning Folks I have bought and own a copy of ASPImage. Installed on my Internet server. Works like a Dream writing and saving image files containing text. My brain seems to have...
1
by: himanshu110 | last post by:
HI guys im fed up with this help me The problem is.. Im having a repeater control in which im having a aspImage Control imgAImageUpload"]..just near to it is a href placed Both are...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
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...

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.