android - Delphi Android 应用程序为我提供了图库中图像的副本。我如何获得原件?
问题描述
试图从图库中获取图像 - 它工作正常,但我得到了重新压缩的副本。
我正在使用以下简单代码从 Android 上的图库中获取图像:
procedure TakePhotoFromGallery;
begin
FParams.RequiredResolution := TSize.Create(MaxInt, MaxInt);
// FParams.RequiredResolution := TSize.Create(3000, 4000); specifiying original dimensions does not help
FParams.Editable := False; // Don't ask user to edit the photo after selecting it
FParams.NeedSaveToAlbum := False; // Seems to have no effect
if TPlatformServices.Current.SupportsPlatformService(IFMXTakenImageService, FGalleryService) then
FGalleryService.TakeImageFromLibrary(nil, FParams);
end;
我订阅TMessageReceivedImagePath
并收到这样的图像:
procedure TMyObject.ReceivedImagePath(const Sender: TObject; const M: TMessage);
begin
if M is TMessageReceivedImagePath then
Log.d('ReceivedImagePath ' + TMessageReceivedImagePath(M).Value);
end;
一切正常,但有一个问题。出于某种原因,我从缺少 EXIF 的图库中获取了图像的副本。原始图像是 3000x400px 2.5mb,我得到 3000x4000px 3.45mb。我需要原件来读取它的 EXIF 数据。
我如何获得原始图像?
解决方案
推荐阅读
- python - PySpark 将模型预测与未转换的数据对齐:最佳实践
- go - 在 go 模板中通过字段名动态访问结构值
- c# - 为什么 Unity 程序集定义会引发错误
- c# - C#如何指定子文件夹中可用的程序集
- vue.js - Vue-router 访问对应路径时不显示组件
- tensorflow - 如何在检测对象时删除/删除边界框?
- flutter - 我如何在颤动中获得设备日期时间?
- vue.js - Vue 3 和 Chartjs 显示 createElement 不是函数错误
- javascript - 我如何在 Electron-js 中从 Sqlite 数据库中获取数据,然后使用 Document.getElementBy('id').innerHTML 显示它
- http - HTTP 响应 591 是什么意思?