function GetNumberBuffer(cZi: string; cwidth, cheight: Integer; FontName: string; bold, italic: Boolean): TDataBytes;
var
col, row: Integer;
cw, ch, cleft, ctop: Integer;
style: TFontStyle;
begin
with TBitmap.Create do
try
SetSize(cwidth, cheight);
PixelFormat := pf32bit;
cw := Canvas.TextWidth(cZi);
ch := Canvas.TextHeight('01234567890.');
cleft := (cwidth - cw) div ;
ctop := (cheight - ch) div ;
if bold then Canvas.Font.Style := Canvas.Font.Style + [fsBold];
if italic then Canvas.Font.Style := Canvas.Font.Style + [fsItalic];
Canvas.TextOut(cleft, ctop, cZi); SetLength(Result, Width, Height);
for col := to Width - do
for row := to Height - do
if Canvas.Pixels[col, row] = then
Result[col, row] :=
else Result[col, row] := ;
finally
Free;
end;
end;

bmp的更多相关文章

  1. Android raw to bmp

    Android raw 格式转 bmp 图像 raw 保存的为裸数据,转换时都需要把它转成RGBA 的方式来显示.其中: 8位RAW: 四位RGBA 来表示一位灰度; 24位RAW: 三位RGB相同, ...

  2. 你所能用到的BMP格式介绍

    原理篇: 一.编码的意义. 让我们从一个简单的问题开始,-2&-255(中间的操作符表示and的意思)的结果是多少,这个很简单的问题,但是能够写出解答过程的人并不 多.这个看起来和图片格式没有 ...

  3. Linux C语言解析并显示.bmp格式图片

    /************************* *bmp.h文件 *************************/ #ifndef __BMP_H__ #define __BMP_H__ # ...

  4. 从Java String实例来理解ANSI、Unicode、BMP、UTF等编码概念

    转(http://www.codeceo.com/article/java-string-ansi-unicode-bmp-utf.html#0-tsina-1-10971-397232819ff9a ...

  5. Linux C语言解析.bmp格式图片并显示汉字

    bmp.h 文件 #ifndef __BMP_H__ #define __BMP_H__ #include <unistd.h> #include <stdio.h> #inc ...

  6. BMP图像差分/比较

    #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char ...

  7. Matlab 读取文件夹中所有的bmp文件

    将srcimg文件下的bmp文件转为jpg图像,存放在dstimg文件夹下 str = 'srcimg'; dst = 'dstimg'; file=dir([str,'\*.bmp']); :len ...

  8. 提取bmp图片的颜色信息,可直接framebuffer显示(c版本与python版本)

    稍微了解了下linux的framebuffer,这是一种很简单的显示接口,直接写入像素信息即可 配置好的内核,会有/dev/fbn 的接口,于是想能否提前生成一个文件,比如logo.fb,里面仅包含像 ...

  9. 【VC++技术杂谈006】截取电脑桌面并将其保存为bmp图片

    本文主要介绍如何截取电脑桌面并将其保存为bmp图片. 1. Bmp图像文件组成 Bmp是Windows操作系统中的标准图像文件格式. Bmp图像文件由四部分组成: (1)位图头文件数据结构,包含Bmp ...

  10. gif jpg bmp png的区别

    PNG格式图片因其高保真性.透明性及文件大小较小等特性,被广泛应用于网页设计.平面设计中.网络通讯中因受带宽制约,在保证图片清晰.逼真的前提下,网页中不可能大范围的使用文件较大的bmp.jpg格式文件 ...

随机推荐

  1. python 中的 *args 和 **kwargs

    在阅读Python代码时,经常会看到如下函数的定义: def fun(*args, **kwargs): 很多同学可能会对此感到困惑,这个 * args和 **kwargs是什么东西.为啥会在源码中应 ...

  2. ubuntu18.04下安装node

    安装Node.js Ubuntu 18.04在其默认存储库中包含一个版本的Node.js,可用于在多个系统间提供一致的体验. 在撰写本文时,存储库中的版本是8.10.0. 这不会是最新的版本,但它应该 ...

  3. routes 学习

    对于routes的学习,感觉还是看官方文档理解的比较快,主要说明connect和resource Setting up routes¶ It is assumed that you are using ...

  4. mabatis--动态sql

    1.mybatis核心,对sql语句进行灵活操作,通过表达式进行判断,对sql进行灵活拼接.组装: 2.使用if判断: <where> <if test="customer ...

  5. Day2-K-Red and Black-HDU1312

    There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A ...

  6. 浅谈Spring发展史

    1 码农的春天----------Spring来了 Spring官网 :http://www.springframework.org 关于Spring的发展起源要回溯到2002年,当时正是Java E ...

  7. leetcode236 Lowest Common Ancestor of a Binary Tree

    """ Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in ...

  8. poj 3617 Best Cow Line 贪心模拟

    Best Cow Line Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 42701   Accepted: 10911 D ...

  9. arm linux 移植 python3.6

    背景: 人生苦短,我用Python. 说明: 编译Python的嵌入式版需要解释器解析setup.py从而编译Python的模块,因此需要先编译出host的解释器.(有点像Go语言) Python : ...

  10. 在线关闭 CLOSE_WAIT状态TCP连接

    1.查看某个端口的所有TCP连接: [root@Centos projects]# netstat -anp | tcp6 ::: :::* LISTEN /java tcp6 CLOSE_WAIT ...