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%5Csit e%5Cafolder%5CD C%5Cboat%5CIM00 1693%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=IM00169 3%2EJPG">
also, I created a session variable to track the physical path location:
<%
Session("Physic alPath") = "c%3A%5Csite%5C afolder%5CDC%5C boat%5C"
%>
here's how I've altered the code to try to break it into chunks inside the
sendbinary.asp
<%
Response.Conten tType = "image/jpeg"
Set Image = Server.CreateOb ject("AspImage. Image")
path = Request.QuerySt ring("path")
imgname = Request.QuerySt ring("imgname")
Upath = Session("Physic alPath")
AllPath = Session("Physic alPath") & Request.QuerySt ring("imgname")
'Image.LoadImag e(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.JPEGQuali ty = 20
' Set new height and width
Dim intXSize, intYSize, intWSize,intHSi ze
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+in tHSize)/2),intWSize,int HSize
Response.Binary Write Image.Image
Set Image = nothing
%>
What am I doing wrong?
Thanks very much,
Kelly 0 1290 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 projects. Unfortunately,
my webhost does not have this component installed. If I personally buy it,
do you think I will be able to install it on the server, or is that
something the webhost has to do? Sorry, I have never had to deal with this...
|
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 Response.BinaryWrite, so this is what I
did:
Response.ContentType = "Image/Jpeg"
Response.BinaryWrite Image.FileName
Instead of showing the image, it shows the binary contents!! Any help is
|
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 onMouseOver=func( )>
|
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
functionality.
Thanks in advance.
|
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 if all are checked. But currently, just the last
selection is going in. Here's the code I have:
| |
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 comment
myself!
Following the conversion I have numerous errors, which following some
digging around turns out to be because _export is obsolete, and
|
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:
|
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 stopped working.
I have tried to write a script that I expect cannot be more than ten lines long.
The towel has been thrown in !!
|
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 placed in a repeater Row as a RowContrl
|
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...
|
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,...
| |
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...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |