Can only modify an image if it contains a bitmap
Can only modify an image if it contains a bitmap
Image1装载了JPG文件后下面都报错,因为。
Image1.Canvas.CopyRect(drect,Image1.Canvas,srect);
Image1.Picture.Bitmap.Canvas.CopyRect(drect,Image1.Canvas,srect);
以上2行都报错。只是在image1的picture为bmp的时候适用。
Image1.Canvas.MoveTo(1,1);
Image1.Canvas.LineTo(100,100);
这样也报错,但是未装载jpg文件或者装载的bmp文件就不报错了。
如果Image1.Picture.Graphic不是TBitmap,Image1.Canvas是不可使用的。
procedure TForm1.Button1Click(Sender: TObject);
var
MyRgn: HRGN;
begin
MyRgn := CreateRectRgn(,,,);
SelectClipRgn(Image1.Canvas.Handle,MyRgn);
Image1.Canvas.Brush.Color := clRed;
Image1.Canvas.FillRect(Image1.Canvas.ClipRect);
Image1.Invalidate;
SelectClipRgn(Image1.Canvas.Handle, HRGN(nil));
DeleteObject(MyRgn);
end;
Image1.Canvas.Brush.Color := clRed;
Image1.Canvas.Brush.Style := bsDiagCross;
Image1.Canvas.Ellipse(, , Image1.Width, Image1.Height);
Can only modify an image if it contains a bitmap的更多相关文章
- AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
异常处理汇总-后端系列 http://www.cnblogs.com/dunitian/p/4523006.html 应用场景:ViewModel==>Mode映射的时候出错 AutoMappe ...
- Modify Branding of FreeCAD
Modify Branding of FreeCAD eryar@163.com This article describes the Branding of FreeCAD. Branding me ...
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
从root账号切换到oracle账号时,出现了"-bash: ulimit: pipe size: cannot modify limit: Invalid argument"提示 ...
- Cannot send session cache limiter Cannot modify header information
当php报出 Cannot send session cache limiter 或Cannot modify header information 的错误时 其理论上是因为php代码以前有 ...
- (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about t
运行redis过程中,突然报错如下: (error) MISCONF Redis is configured to save RDB snapshots, but is currently not a ...
- 阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决方法
阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决 ...
- Modify a Stored Procedure using SQL Server Management Studio
In Object Explorer, connect to an instance of Database Engine and then expand that instance. Expand ...
- Modify textures at runtime
动态修改Texture Modify textures at runtime?http://answers.unity3d.com/questions/7906/modify-textures-at- ...
- (HY000): Cannot modify @@session.sql_log_bin inside a transaction
昨天,线上发生一例(HY000): Cannot modify @@session.sql_log_bin inside a transaction代码缺少显示的start transaction控制 ...
随机推荐
- stm32寄存器版学习笔记04 定时计数器中断
STM32共有8个定时计数器,其中TIME1和TIME8是高级定时器,TIME2~TIME5是通用定时器,TIME6和TIME7是基本定时器.以TIME3为例总结定时计数器的基本用法. 1.TIM3的 ...
- 关于Mybatis将查询结果中添加常量列并返回
引言 在使用mybatis的时候,查询一个集合返回给前台页面,在有的时候,我们会添加一个常量字段到对象或者集合中,来标识这个对象属于的类型等等情况,当前台进行再次请求的时候携带此变量进行请求. 但是: ...
- 《selenium2 python 自动化测试实战》(21)——unittest单元测试框架解析
unittest是展开自动化测试的基础——这个框架很重要! 我们先自己写一个测试类: 1.被测试类 Widthget.py: # coding: utf-8 class Widthget: de ...
- echarts tooltips宽度设置
提示文本太长显示不全,设置宽度后:
- parceljs 基本使用———又一个前端构建工具
备注: 又一个新的前端构建工具 1. 安装 yarn global add parcel-bundler 2. 初始化项目 yarn init -y 3. 基本代码 a. 创建 index. ...
- 使用PHP类库PHPqrCode生成二维码
PHPqrCode是一个PHP二维码生成类库,利用它可以轻松生成二维码,官网提供了下载和多个演示demo, 查看地址:http://phpqrcode.sourceforge.net/. 下载官 ...
- GCC用法
http://www.cnblogs.com/hibernate6/archive/2010/08/24/2522057.html
- luvcview,使用mplayer查看摄像头和luvcview保存YUV图像视频的播放(转)
luvcview,使用mplayer查看摄像头和luvcview保存YUV图像视频的播放 在mplayer中查看摄像头,可使用如下命令:mplayer tv:// -tv driver=v4l2:in ...
- 从汇编的角度看待变量类型与sizeof的机制
1.动机:前段时间,一直有个疑问,就是编译器是从哪里知道数据的类型的,数据的类型是存在内存里面的么,因为自己调试编译器,发现内存中并没有多余的数据,后来在群上发问,才知道数据在编译成汇编的过程就知道数 ...
- php端安装rabbitmq-c
php端安装rabbitmq-c url:https://github.com/alanxz/rabbitmq-c cd rabbitmq-c**** ./configure --prefix=/us ...