Caricamento...Imports System
Imports System.Data.SqlClient
Imports System.Data
Imports System.IO
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Drawing.Text
Public Function createImage()
Dim objBMP, objBMP2 As Bitmap
Dim objGraphics As Graphics
Dim objFont, objFontTitle As Font
Dim objBMP2height, objBMP2width As Integer
objBMP = New Bitmap(Request.PhysicalApplicationPath & "images\footerModule\bg.jpg")
objBMP2 = New Bitmap(Request.PhysicalApplicationPath & "images\footerModule\test.jpg")
objBMP2height = objBMP2.Height
objBMP2width = objBMP2.Width
objGraphics = System.Drawing.Graphics.FromImage(objBMP)
objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias
objFontTitle = New Font("Arial", 12, FontStyle.Bold)
objFont = New Font("Arial", 12)
objGraphics.DrawImage(objBMP2, 1, 1)
objGraphics.DrawString("Title", objFontTitle, Brushes.Black, objBMP2width, 1)
objGraphics.DrawString("Loret ipsum dolor amet", objFont, Brushes.Black, objBMP2width, 15)
Response.ContentType = "image/Png"
objBMP.Save(Request.PhysicalApplicationPath & "images\footerModule\immagine2.png", ImageFormat.Png)
objFont.Dispose()
objGraphics.Dispose()
objBMP.Dispose()
End Function
Lascia un commento
Copyright © 2005 - 2010 :: ianaz - created by Silvio Rainoldi