怎样判断图片是16*16还是32*32的? 怎样判断图片是16*16还是32*32的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var bmp: TbitMap;begin bmp := TBitMap.Create; try bmp.LoadFromFile('c:\a.bmp'); if (bmp.Width = 16) and (bmp.Height = 16) then begin end else if (bmp.Width = 32) and (bmp.Height = 32) then begin end; finally bmp.Free; end;end; Image控件使用了TBitmap类。这个类的可以得到图片的Width,HeightTImage.Picture.Bitmap.WidthTImage.Picture.Bitmap.Height TImage.Picture.Bitmap.WidthTImage.Picture.Bitmap.Height这个才是得到图片实际的宽高bmp.Width bmp.Height这个是控件的宽高两个是不同的哈 看楼上那些的,也可以读bmp的文件头 delphi 进制转换与相与问题 如何知道焦点从哪里面转移来 急!急!如何制作安装盘?数据库别名怎么办? 初学,如何获得一个集合中的元素个数? 判断表是否存在,简单问题,可是我不会 (在线等 请介绍一下DirectX开发的书 请推荐几本delphi数据库编程的书 请问这段关于文件读写的代码有什么错误?一定给分! 如何去DELPHI官网上下载UPDATE? 怎样使用query或者adoquery获得查询语句count结果 一个捆饶很久的问题。给分100 数据结构的菜菜问题。。。。
bmp: TbitMap;
begin
bmp := TBitMap.Create;
try
bmp.LoadFromFile('c:\a.bmp');
if (bmp.Width = 16) and (bmp.Height = 16) then
begin end
else
if (bmp.Width = 32) and (bmp.Height = 32) then
begin end;
finally
bmp.Free;
end;
end;
TImage.Picture.Bitmap.Width
TImage.Picture.Bitmap.Height
TImage.Picture.Bitmap.Height这个才是得到图片实际的宽高
bmp.Width bmp.Height这个是控件的宽高
两个是不同的哈