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控制 ...
随机推荐
- Codeforces 25E Test 【Hash】
Codeforces 25E Test E. Test Sometimes it is hard to prepare tests for programming problems. Now Bob ...
- Mysql-Proxy 读写分离的各种坑,特别是复制延迟时
延迟问题读写分离不能回避的问题之一就是延迟,可以考虑Google提供的SemiSyncReplicationDesign补丁. 端口问题MySQL-Proxy缺省使用的是4040端口,如果你想透明的把 ...
- mui 拨打电话
function callPhone() { let btnArray = ['拨打', '取消']; let Phone = "10086"; mui.confirm('是否拨打 ...
- Redis持久化的简单介绍
Redis的强大功能很大程度上是由于其将所有数据都存储在内存中,为了使Redis在重启后仍能保证数据不丢失,需要将数据从内存中以某种形式持久化到硬盘中. Redis支持两种方式的持久化,一种是RDB方 ...
- Redis简单介绍与安装
Redis是一个开源,高级的键值存储和一个适用的解决方案,用于构建高性能,可扩展的Web应用程序. Redis有三个主要特点,使它优越于其它键值数据存储系统 - 1) Redis将其数据库完全保存在内 ...
- Android JNI中的数据传递
1.JNI 基本类型 当 Java 代码与本地代码 C/C++ 代码相互调用时,肯定会有参数的传递.两者属于不同的语言,数据类型有差别,此时,JNI 要保证两种语言之间的数据类型和数据空间大小的匹配. ...
- saiku3.8二次开发项目搭建(非maven)
参考文章:http://blog.csdn.net/gsying1474/article/details/51603535 本文大部分参考了上面的博文,这里只是做一个记录,由于本人maven能力有限, ...
- CentOS6.8编译安装LAMP
CentOS6.8编译安装Apache2.4.25.MySQL5.7.16.PHP5.6.29 初始化 #固定IP vi /etc/sysconfig/network-scripts/ifcfg-et ...
- 在 myeclipse中进行连接sql server的测试
在 myeclipse中,连接 sql server 用的 url connection 与 java 代码 连接的 url值完全相同. (一下为 java的jdbc连接 sql server 成功的 ...
- QT——在QGraphicsScene中限制图元的拖动范围
欲使QGraphicsItem可拖动,则需设置标志位:setFlag(ItemIsMovable,true); 而如果想限制QGraphicsItem对象的移动范围,需要继承QGraphicsItem ...