请问vb中可以实现给定一个bmp图片和一串字符,然后合成为一个新的bmp图片吗

CrazyNotes 2005-11-07 01:30:36
不知道哪种方法实现,将一串字符插入图片文件中生成新的bmp文件.急救!
...全文
237 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhzhq800204 2005-11-08
  • 打赏
  • 举报
回复
学习学习
zou19820704 2005-11-08
  • 打赏
  • 举报
回复
狼行天下果然是高手,佩服佩服!!
northwolves 2005-11-07
  • 打赏
  • 举报
回复
Private Sub Command1_Click()
changepic "d:\2.jpg", "xxxxxx", "d:\111.jpg"
End Sub

Sub changepic(ByVal picpath As String, ByVal mystr As String, ByRef newpicpath As String)
Dim pic1 As PictureBox
Set pic1 = Me.Controls.Add("vb.picturebox", "pic1", Me)
pic1.AutoSize = True
pic1.AutoRedraw = True
pic1.Picture = LoadPicture(picpath)
pic1.ForeColor = vbRed
pic1.Print mystr
SavePicture pic1.Image, newpicpath
Me.Controls.Remove pic1
MsgBox "ok"
End Sub
feiyun0112 2005-11-07
  • 打赏
  • 举报
回复
龙卷风缩略图水印组件
http://blog.csdn.net/online/archive/2005/07/13/424411.aspx
shawls 2005-11-07
  • 打赏
  • 举报
回复
。net的


Dim bmap As Image'pull an image from memory, could also be from the file system.bmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Image)'here's where we modify the image in memoryDim g As Graphics = Graphics.FromImage(bmap)'now prepare our brush to draw the text onto the image.Dim drawFont As New Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Millimeter)Dim drawBrush As New SolidBrush(Color.Red)'figure out where we want to place the text getting the x & y coordinate.Dim xPos As Integer = bmap.Height - (bmap.Height - 25)Dim yPos As Integer = 3'now draw the date using "Now".g.DrawString(Now, drawFont, drawBrush, xPos, yPos)'check to see if the property to save the file is enabled.







Dim sPicPath As String = "C:\Path to your file store\filename.jpg"
Dim sPreFix As String = "C:\image file path\"
'now declare another image to store our thumbnail image.
Dim smBmap As Image
'now we're going to get a thumbnail image from the bitmap we worked'with earlier in the method.smBmap = bmap.GetThumbnailImage(bmap.Width, bmap.Height, Nothing, Nothing)'save the image to our path and save it as a jpeg.smBmap.Save(sPicPath, Imaging.ImageFormat.Jpeg)'now save a copy of the original image to the local disk.bmap.Save(Replace(sPreFix, "\images", "") & ".jpg", Imaging.ImageFormat.Jpeg)bmap = NothingsmBmap = Nothing

shawls 2005-11-07
  • 打赏
  • 举报
回复
ASP中给图片加上文字

你参考


<HTML>
<HEAD>
<title>Upload Form</title>
<script language="vbscript">
Function setMe()
dim sValue,objImg
sValue = trim(document.all("file1").value)
set objImg = document.all("imgDummy")
objImg.src = "SetValue.asp?value=" & sValue & "&valueName=picName"
set objImg = nothing
End Function
</script>
</HEAD>
<BODY bgcolor=LightYellow>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" id=form1 name=form1 action="upload.asp">
Please click on Browse to select a file to be uploaded.<br>
<INPUT TYPE="FILE" NAME="FILE1" SIZE="50" onchange="vbscript : SetMe()"><BR>
<input type="submit" value="Upload!" id=submit1 name=submit1>

<img src="" ID="imgDummy" width="0" height="0" style="display:none;">
</form>
</BODY>
CrazyNotes 2005-11-07
  • 打赏
  • 举报
回复
最好能做成一个exe执行文件,执行以下命令,就生成新的bmp文件呢
程序.exe aaaaaaa tp.bmp

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧