Foros del Web » Programando para Internet » ASP Clásico »

Aydua aspimage

Estas en el tema de Aydua aspimage en el foro de ASP Clásico en Foros del Web. tengo este componente instalado, el codigo funciona perfecto <% 'Create the object Set Image = Server.CreateObject("AspImage.Image") 'Load image from the server ( must be the ...
  #1 (permalink)  
Antiguo 05/03/2003, 19:24
Avatar de deprabado  
Fecha de Ingreso: febrero-2002
Mensajes: 649
Antigüedad: 22 años, 3 meses
Puntos: 0
Aydua aspimage

tengo este componente instalado, el codigo funciona perfecto

<%
'Create the object
Set Image = Server.CreateObject("AspImage.Image")

'Load image from the server ( must be the absolute path to it )
Image.LoadImage("c:\inetpub\morningz\images\thispi c.jpg" )

'This property will get the height of the loaded image
Height = Image.MaxY

'Set up the text
Image.FontName = "Verdana"
Image.FontColor = vbYellow
Image.FontSize = 10
Image.Bold = True
Image.ThreeDColor = vbBlack

'Will place the text 18 pixels from the bottom and 1 pixel from the left of the picture
Image.TextOut " MorningZ.com ", 1, Height-18, True

'Set the file name for saving, directory must be set to "Everyone - Everything" permissions
Image.FileName = "c:\inetpub\morningz\images\thispic.jpg"

'Does the actual save and returns a boolean value telling success ( the if statement is optional )
if Image.SaveImage then
bSavedSuccessfully = True
else
bSavedSuccessfully = False
end if
%>

pero quiero que la imagen sea una variable, la cual paso desde un form... alguien puede ayudarme he hecho pruebas y siempre se me cae....
  #2 (permalink)  
Antiguo 05/03/2003, 21:27
Avatar de Manoloweb  
Fecha de Ingreso: enero-2002
Ubicación: Monterrey
Mensajes: 2.454
Antigüedad: 22 años, 4 meses
Puntos: 5
Probaste ya con el Eval?

imagen=Request.Querystring("imagen")
Eval("Image.LoadImage('c:\inetpub\morningz\images\ "&imagen&"')")


Puede que te sirva (si es que entendi bien..)

__________________
Manoloweb
  #3 (permalink)  
Antiguo 05/03/2003, 21:36
Avatar de deprabado  
Fecha de Ingreso: febrero-2002
Mensajes: 649
Antigüedad: 22 años, 3 meses
Puntos: 0
Gracias manolo eso era justo lo que necesitava, asiganar la imagen dinamiamente, no lo he probado pero me puedes explicar el "eval", nunca lo he usado pero me agada si es lo que creo.
  #4 (permalink)  
Antiguo 05/03/2003, 21:40
Avatar de Manoloweb  
Fecha de Ingreso: enero-2002
Ubicación: Monterrey
Mensajes: 2.454
Antigüedad: 22 años, 4 meses
Puntos: 5
Lo que hace es que te permite "componer" una linea de código a base de una concatenación de diferentes strings, y cuando completa la tarea... baaammm!! lo ejecuta como si lo hubieras escrito tu mismo como código.


Espero que te ayude... y tambien espero que la sintaxis que te puse sea válida... si no, solo busca info sobre "eval" ya que de eso si estoy seguro: Existe y Funciona como te dije...

__________________
Manoloweb
  #5 (permalink)  
Antiguo 05/03/2003, 21:44
Avatar de deprabado  
Fecha de Ingreso: febrero-2002
Mensajes: 649
Antigüedad: 22 años, 3 meses
Puntos: 0
sip, ya vi en dev uru, tambien tiene otros usos como el de evaluar cadenas y ver si sus valores son identicos:

Code:
<%
ThisVar = 5.556
AnotherVar = 5.556
%>
<% =Eval("ThisVar = AnotherVar") %>

Output:
true

Code:
<% MyVar = Eval("CInt(12345.6789)") %>
<% =MyVar %>

Output:
12345

me gusta
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:34.