Upload billede med print af logo
HejJeg har en opload funktion som ser ud som følger neden for. Her bliver navnet på firmaet skrevet ind i billedet når det uploades.
Men jeg vil gerne have at jeg i stedet for kan uploade et trans-billede ovenpå sådan at logoet er faidet ud ovenpå billedet - men hvordan gør jeg det??
fileName = "image_"&Last_ID&".jpg"
set rs = Server.CreateObject("ADODB.Recordset")
strSQL = "UPDATE " & TB_SHOP_CONTENT & " SET SHOP_CONTENT_PIC = '" & fileName & "' WHERE SHOP_CONTENT_ID = '" & Last_ID & "'"
rs.open strSQL,strDNS
For each file In mySmartUpload.Files
' Only if the file exist
If not file.IsMissing Then
file.SaveAs("../../shop/" & FileName)
Set Image = Server.CreateObject("AspImage.Image")
Image.LoadImage Server.MapPath("../../shop/"&fileName&"")
response.write Server.MapPath("../../shop/"&fileName&"")
ImageHeight = Image.MaxY
ImageWidth = Image.MaxX
copyheight = ImageHeight
Image.ImageFormat = 1
Image.JPEGQuality = 50
size = "400"
if int(ImageHeight) > int(size) then
newHeight = size
newWidth = Cint(ImageWidth*size/ImageHeight)
Image.ResizeR newWidth, newHeight
copyheight = newHeight
End if
if NewWidth > size then
NewWidth = size
NewHeight = Cint(ImageHeight*size/ImageWidth)
Image.ResizeR NewWidth,NewHeight
copyheight = newHeight
end if
Image.FontName = "Verdana"
Image.FontColor = vbWhite
Image.FontSize = 10
Image.Bold = True
Image.ThreeDColor = vbBlack
'Will place the text 18 pixels from the bottom and 2 pixel from the left of the picture
'Image.TextOut strMessage, Image.X, Image.Y, true
Image.TextOut "© NAVN", 2, copyheight-18, True
Image.FileName = (server.mappath("../../shop/"&fileName&""))
Image.SaveImage
Set Image = Nothing
ELSE
set rs = Server.CreateObject("ADODB.Recordset")
strSQL = "UPDATE " & TB_SHOP_CONTENT & " SET SHOP_CONTENT_PIC = 'soon.jpg' WHERE SHOP_CONTENT_ID = '" & Last_ID & "'"
rs.open strSQL,strDNS
End If
Next
End If