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

Escribir en imágenes

Estas en el tema de Escribir en imágenes en el foro de ASP Clásico en Foros del Web. Hola, Tengo el siguiente código: Código: <%@ Page Language="vb" %> <%@ import namespace="system.drawing" %> <%@ import namespace="system.drawing.imaging" %> <%@ import namespace="system.drawing.drawing2d" %> <% ' initialise ...
  #1 (permalink)  
Antiguo 13/03/2005, 17:17
 
Fecha de Ingreso: enero-2004
Ubicación: Chihuahua, México
Mensajes: 146
Antigüedad: 21 años, 3 meses
Puntos: 0
De acuerdo Escribir en imágenes

Hola,
Tengo el siguiente código:

Código:
<%@ Page Language="vb"  %>
<%@ import namespace="system.drawing" %>
<%@ import namespace="system.drawing.imaging" %>
<%@ import namespace="system.drawing.drawing2d" %>
<%
' initialise objects
Dim strFilename as string
Dim b as new System.Drawing.Bitmap(server.mappath("images/1.jpg"))

dim g as graphics = graphics.fromimage(b)

g.smoothingMode = smoothingMode.antiAlias


Dim stringFormat As New StringFormat()
stringFormat.FormatFlags = StringFormatFlags.DirectionVertical

g.drawString("www.dechihuahua.com", new font("arial",12,fontstyle.bold),Brushes.white, new pointF(0,5), stringFormat)


' set the content type
response.contenttype="image/jpg"

' send the image to the viewer
b.save(response.outputstream, b.rawformat) 

' tidy up
b.dispose()

%>
Al visualizarlo en mi navegador me da la imágen con elt exto ya escrito.
El problema es que cuando la quiero bajar (click derecho y guardar) me baja el código y no la imágen.
¿Será por el tipo de output? ya intenté llamándolo desde un include en una página .asp pero no funciona.

Gracias por su tiempo
__________________
¡Que todo sea para bien del hombre!
www.dechihuahua.com
Comunidad Chihuahuense
----------- (50%)
Sólo hasta que el Hombre siente la energía universal, sabe de lo que está hecho.
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 08:01.