delphi JBitmapBitmap互转转换
来源:互联网 发布:如何在淘宝上买发票啊 编辑:程序博客网 时间:2024/05/08 00:35
uses
Androidapi.JNI.GraphicsContentViewText,
FMX.Helpers.Android,
FMX.Surfaces;
//JBitmap转Bitmap
function JBitmapToBitmap(const AImage: JBitmap): TBitmap;
var
bitmapSurface :TBitmapSurface;
begin
bitmapSurface := TBitmapSurface.Create;
try
if JBitmapToSurface(AImage, bitmapSurface) then
begin
Result.Assign(bitmapSurface);
end;
finally
bitmapSurface.Free;
end;
end;
//Bitmap转JBitmap
function BitmapToJBitmap(Bmp:TBitmap): JBitmap;
var
mBitmap: JBitmap;
Surface: TBitmapSurface;
begin
Surface := TBitmapSurface.Create;
Surface.Assign(bmp);
mBitmap := TJBitmap.JavaClass.createBitmap(Bmp.Width, Bmp.Height, TJBitmap_Config.JavaClass.ARGB_8888);
if SurfaceToJBitmap(Surface, mBitmap) then
Result := mBitmap;
end;
Androidapi.JNI.GraphicsContentViewText,
FMX.Helpers.Android,
FMX.Surfaces;
//JBitmap转Bitmap
function JBitmapToBitmap(const AImage: JBitmap): TBitmap;
var
bitmapSurface :TBitmapSurface;
begin
bitmapSurface := TBitmapSurface.Create;
try
if JBitmapToSurface(AImage, bitmapSurface) then
begin
Result.Assign(bitmapSurface);
end;
finally
bitmapSurface.Free;
end;
end;
//Bitmap转JBitmap
function BitmapToJBitmap(Bmp:TBitmap): JBitmap;
var
mBitmap: JBitmap;
Surface: TBitmapSurface;
begin
Surface := TBitmapSurface.Create;
Surface.Assign(bmp);
mBitmap := TJBitmap.JavaClass.createBitmap(Bmp.Width, Bmp.Height, TJBitmap_Config.JavaClass.ARGB_8888);
if SurfaceToJBitmap(Surface, mBitmap) then
Result := mBitmap;
end;
阅读全文
0 0
- delphi JBitmapBitmap互转转换
- 电平转转换电路
- Delphi的unicode与GB2312转转换, 汉字unicode转GB2312
- asp 编码转转换两次urecode
- 转转
- delphi图片换肤处理优化修正
- Delphi鼠标滑过换底色
- 回来转转!
- 过来转转
- 来转转
- 随便转转
- 兜兜转转
- 转转转
- 转转反侧
- 完美界面换肤解决方案 vc调用delphi皮肤库
- 脑筋急转转转弯
- Rss介绍(转转)
- javascript code all (转转)
- java.lang.OutOfMemoryError: GC overhead limit exceeded异常处理
- 【递归入门】组合的输出
- XDC+ 数据中心获Tier IV设计认证
- 获取文件属性—stat、lstat、fstat
- Java 错别字检查接口 API
- delphi JBitmapBitmap互转转换
- jdk1.8 ArrayList源码详解
- Jmeter使用CSV文件读取大量测试数据
- java.util.concurrent.locks.Lock
- 新型勒索软件—“GIBON”发布解密工具
- python模块学习(queue模块的Queue类、PriorityQueue类和LifoQueue类)
- vim 打造超强IDE集成开发环境
- Unable to locate package错误解决办法
- type=image 来提交表单和type=submit提交表单的不同