11年11个月前IP:北京
739375
6楼
同上
PC上直接用GDI+
任意大小都可以做
System.Drawing里面,好像
这个是.NET框架里的东西



Sub LoadString(ByRef Path As String, ByRef Context As String, ByRef Brush As System.Drawing.Brush, ByVal Size As Integer, Optional ByVal Width As Integer = 1920, Optional ByVal Height As Integer = 1080)
                    ’///////////////////////////////字符绘制////////////////////////////
                    Dim Image As System.Drawing.Bitmap = New Bitmap(Width, Height)
                    Dim GDI As System.Drawing.Graphics = Graphics.FromImage(Image)
                    Dim FontFamily As System.Drawing.FontFamily = New FontFamily("微软雅黑")
                    Dim Font As System.Drawing.Font = New Font(FontFamily, Size, FontStyle.Regular, GraphicsUnit.Pixel)
                    GDI.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
                    GDI.InterpolationMode = Drawing2D.InterpolationMode.High
                    GDI.DrawString(Context, Font, Brush, 0, 0)
                    GDI.Dispose() : Font.Dispose() : FontFamily.Dispose()
                    ‘///////////////////转灰度,其实算法改下就可以转黑白//////////////////////////
                    Dim Rect As Rectangle = New Rectangle(0, 0, Image.Width, Image.Height)
                    Dim Color As System.Drawing.Color : Dim ColorTmp As System.Drawing.Color
                    For i = 0 To Rect.Width - 1 Step 1
                    For j = 0 To Rect.Height - 1 Step 1
                        Color = Image.GetPixel(i, j)
                        Dim TmpInt As Integer = (CInt(Color.R) + CInt(Color.G) + CInt(Color.B)) \ 3
                        ColorTmp = System.Drawing.Color.FromArgb(TmpInt, TmpInt, TmpInt)
                        Image.SetPixel(i, j, ColorTmp)
                    Next j
                Next i
                ‘/////////////////接下来就是读这个Bitmap的每个像素,按照显示屏的类型生成点阵数据了
                ’/////////////////String类还是很强大的/////////////////
                End Sub


把自己写的一些玩意合并了一下。。。
评论
文号 / 739375

十步芳草
名片发私信
学术分 0
总主题 16 帖总回复 250 楼拥有证书:进士 机友 笔友
注册于 2013/03/09 20:15:00最后登录 2023/09/08 15:08:10
主体类型:个人
所属领域:无
认证方式:手机号
IP归属地:0

个人简介

暂未填写
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的