Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/03/2003, 15:56
Avatar de deprabado
deprabado
 
Fecha de Ingreso: febrero-2002
Mensajes: 649
Antigüedad: 23 años, 1 mes
Puntos: 0
Ayuda Urgentisima Con Aspimage

Les planteo mi situacion, el ASPIMAGE es un componente que permite la creacion de imagenes y la modificacion de las mismas al vuelo, es decir en el servidor.

Tengo un codigo ejemplo el cual 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("xxx\robertomata.com\www\2003\ensa yos\imagen.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 " ROBETOMATA.COM ", 1, Height-18, True

'Set the file name for saving, directory must be set to "Everyone - Everything" permissions
Image.FileName = "xxx\robertomata.com\www\2003\ensayos\imagen.j pg"

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

Simplemente me inserta en la imagen una frase, el problema reside en que yo subo las imagenes al servidor, con X nombre con un formulario, por lo tanto el nombre de la imagen a modificar deberia ser una variable, tengo este codigo que lo hace perfecto:


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

'Load image from the server ( must be the absolute path to it )
Image.LoadImage("xxx\www\2003\ensayos\"&imagen&".j pg " )

'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 " ROBETOMATA.COM ", 1, Height-18, True

'Set the file name for saving, directory must be set to "Everyone - Everything" permissions
Image.FileName = "xxx\robertomata.com\www\2003\ensayos\"&imagen&".j pg"

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

pero apesar de que el componente funciona, es decir no me muestra ningun error,la imagen no se puede visualizar, a diferencia del codigo anterior que si lo hace, es rarisimo, ya que bajo la imagen y nisiquiera la puedo abrir con ningun programa de edicion de imagenes, me da error de formato...

alguien me podra ayudar?