ImageOrientationService class abstract
发送前的图片方向归一化适配器。
Android 相机写入的 JPEG 把旋转信息放在 EXIF 里,像素本身是横置或倒置的。
原生 Android IMLib 在发送前用 BitmapUtil.orientationPreprocess 把方向烘焙
进像素(见 android-imsdk/IMLib/libcore/src/main/java/io/rong/message/utils/
BitmapUtil.java),而 Rust SDK 生成缩略图、压缩图时不会读取 EXIF,于是缩略图
比例、气泡尺寸以及对方收到的图片都会按未旋转的像素展示。
因此移动端在把本地文件交给 createImageMessage 之前先产出一份方向已归一的
临时文件;桌面端按产品要求发送原图,保持原样透传。任何一步失败都返回原路径,
不阻塞发送。
- Implementers
Constructors
- ImageOrientationService()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
normalizeForSending(
String localPath) → Future< String> -
返回可以交给 SDK 的本地路径;不需要或无法处理时返回
localPath。 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited