当前位置:网站首页>texturebrush 创建时提示内存不足
texturebrush 创建时提示内存不足
2022-07-20 16:13:00 【ima_zhan】
今天使用了一下texturebrush,
using (Brush imgbrs = new TextureBrush(bmp, WrapMode.Tile, new Rectangle(0, 0, rect.Width, rect.Height)))
{ g.FillRectangle(imgbrs, rect); }
结果提示内存不足的错误,后来改成
using (Brush imgbrs = new TextureBrush(bmp, WrapMode.Tile, new Rectangle(0, 0, bmp.Width, bmp.Height)))
{ g.FillRectangle(imgbrs, rect); }
就没问题了。
看来这个rect的范围只能在图片大小范围内,也就是说用图片创建的画刷,刷子的大小要小于图片大小。
边栏推荐
猜你喜欢
随机推荐
kubevirt 管理虚拟机
李宏毅老师2020年深度学习系列讲座笔记2
VMware low version starts the blue screen solution of virtual machine (it takes 3 days to restart the installation experience, which must be seen before installation)
PointRend解析
CentOS 7部署Memcached缓存服务器
深度学习基础与实践课程笔记0&1
VMware低版本启动虚拟机蓝屏解决方案(重启了3天才安装好的经验,装前必看)
链表(五)——删除链表的倒数第N个节点
高通连发三款处理器:骁龙730G有望成为次旗舰首选!
[2022 Huawei developer competition series live broadcast] who can't wait for the wonderful combination of database veterans + best-selling authors?
Musk: I uploaded my brain to the cloud. Sorry, 404
Understand the secondary node of industrial Internet identity analysis
For the IT Internet industry, does family think education is important or ability?
ncnn op forward代码学习
Some easily confused pointers [summary direction]
交叉熵损失
Detailed explanation of redis cluster construction and configuration optimization
Self study notes on Bayesian probability and Bayesian networks and Bayesian causal networks
Matlab基本语法(二)
Li Hongyi 2020 machine learning deep learning notes 1+2 & deep learning foundation and practice course notes 2