社区
界面
帖子详情
有谁知道如何取bitmap的width和height?
xiyi0616
2003-09-29 09:27:01
我的bitmap 是 LoadBitmap从资源中载入,只知道bitmap handle, 怎么取它的宽和高?谢谢!
...全文
63
8
打赏
收藏
有谁知道如何取bitmap的width和height?
我的bitmap 是 LoadBitmap从资源中载入,只知道bitmap handle, 怎么取它的宽和高?谢谢!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
xiyi0616
2003-09-30
打赏
举报
回复
我自己已找到getobject来解决,谢谢上面各位!
分数不多,分配不一定合理,关键是谢谢大家的帮助!
xiyi0616
2003-09-30
打赏
举报
回复
我自己已找到getobject来解决,谢谢上面各位!
分数不多,分配不一定合理,关键是谢谢大家的帮助!
会思考的草
2003-09-30
打赏
举报
回复
LPBITMAPINFO m_pBmpInfo;
m_pBmpInfo = (LPBITMAPINFO)new BYTE[sizeof(BITMAPINFO) + 256*sizeof(RGBQUAD)];
//此处加载图像
m_pBmpInfo->bmiHeader.biWidth //宽
m_pBmpInfo->bmiHeader.biHeight //高
ssfly
2003-09-30
打赏
举报
回复
bitmap.LoadBitmap(IDB_BITMAP1);
BITMAP bmp;
bitmap.GetBitmap(&bmp);
bmp.bmWidth和bmp.bmHeight即为IDB_BITMAP1的宽和高
lif2000
2003-09-30
打赏
举报
回复
m_size=m_bitmap.GetBitmapDimension();
bluebohe
2003-09-29
打赏
举报
回复
CBitmap::GetBitmapDimension
zcpro
2003-09-29
打赏
举报
回复
BITMAP bm;
GetObject(你的位图句柄, sizeof(BITMAP), (void *)&bm);
bm.bmWidth和bm.bmHeight就是你要的。
学vc要多查msdn,里面什么都有的。
xiyi0616
2003-09-29
打赏
举报
回复
我的bitmap是DC中的对象
Android 使用create
Bitmap
时出现异常
width
and
height
must be > 0
异常信息:Caused by: java.lang.IllegalArgumentException:
width
and
height
must be > 0 异常代码:
Bitmap
resize
Bitmap
(int des
Height
, int des
Width
,
Bitmap
origin
Bitmap
) { int
height
= origin
Bitmap
.g
Bitmap
.create
Bitmap
参数异常之java.lang.IllegalArgumentException:
width
and
height
must be > 0
代码: public static
Bitmap
read
Bitmap
InSize(Context paramContext, int paramInt, int
width
, int
height
) { Matrix matrix = new Matrix();
Bitmap
bitmap
= read
Bitmap
(paramContext, paramInt); matrix.s
Bitmap
.create
Bitmap
java.lang.IllegalArgumentException:
width
and
height
must be > 0 问题解决
java.lang.IllegalArgumentException:
width
and
height
must be > 0 在postraotate之前需要设置转换矩形区域 旋转时要判断旋转角度是否大于0,否则不做旋转。 缺一报错 Matrix mt = new Matrix(); float delta = angle - lastAngle;
Bitmap
.create
Bitmap
(int
width
, int
height
, Config config) Config参数的说明
0、相关文章:
Bitmap
.create
Bitmap
(阅读量7k,1赞) 1、正文: 最近学习Api文档,打开Android.graphics.
Bitmap
类里有一个内部类
Bitmap
.Config类,在
Bitmap
类里create
Bitmap
(int
width
, int
height
,
Bitmap
.Config config)方法里会用到,打开个这个类一看 枚举变量 public ...
Bitmap
create
Bitmap
相关参数
(一)
Bitmap
方法相关参数:(1)
Bitmap
create
Bitmap
(
Bitmap
src)从原位图src复制出一个新的位图,和原始位图相同(2)
Bitmap
create
Bitmap
(int
width
, int
height
,
Bitmap
.Config config)根据参数创建新位图int
width
The
width
of the
bitmap
int heigh...
界面
15,979
社区成员
115,897
社区内容
发帖
与我相关
我的任务
界面
VC/MFC 界面
复制链接
扫一扫
分享
社区描述
VC/MFC 界面
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章