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控制 ...
随机推荐
- hiho1601最大分数 DP
#1601 : 最大得分 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi和小Ho在玩一个游戏.给定一个数组A=[A1, A2, ... AN],小Hi可以指定M个 ...
- BZOJ4236 JOIOJI 【map】
BZOJ4236 JOIOJI Description JOIOJI桑是JOI君的叔叔.“JOIOJI”这个名字是由“J.O.I”三个字母各两个构成的. 最近,JOIOJI桑有了一个孩子.JOIOJI ...
- Codeforces 834D The Bakery 【线段树优化DP】*
Codeforces 834D The Bakery LINK 题目大意是给你一个长度为n的序列分成k段,每一段的贡献是这一段中不同的数的个数,求最大贡献 是第一次做线段树维护DP值的题 感觉还可以, ...
- Quartz 2D编程指南- PDF文档的创建、显示及转换
PDF文档存储依赖于分辨率的向量图形.文本和位图,并用于程序的一系列指令中.一个PDF文档可以包含多页的图形和文本.PDF可用于创建跨平台.只读的文档,也可用于绘制依赖于分辨率的图形. ...
- hadoop2.x常用端口、定义方法及默认端口、hadoop1.X端口对比
问题导读: 1.DataNode的http服务的端口.ipc服务的端口分别是哪个? 2.NameNode的http服务的端口.ipc服务的端口分别是哪个? 3.journalnode的http服务的端 ...
- 《DSP using MATLAB》示例Example7.24
代码: ws1 = 0.2*pi; wp1 = 0.35*pi; wp2 = 0.65*pi; ws2 = 0.8*pi; Rp = 1.0; As = 60; [delta1, delta2] = ...
- Netflix OSS 和 SpringCloud Netflix简介
Netflix OSS Netflix是一家互联网流媒体播放商,是美国视频巨头,随着Netflix转型为一家云计算公司,它也开始积极参与开源项目. Netflix OSS(Open Source)就是 ...
- 几种分布式调用技术的比较 -- RPC VS REST
我之前在传统IT公司干活,后来来了互联网,感受到了很多不同,其中有一点就是两者使用到的技术有一些差别.比如说分布式调用技术. 我在的这家公司内部的服务架构是基于Thrift的,服务基于Thrift进行 ...
- 两分钟学会Android平台NDK编程(无须Eclipse和cygwin,可使用命令行打包多个so)
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/wangbin_jxust/article/details/37389383 之前在进行cocos2d ...
- 嵌入式linux问题杂锦
tftp 在开发板上不能获取共享文件,出现: Permission denied tftp: can't open 'myTcpTest': Permission denied 是因为,我在/sys目 ...