CaiJingLong / dart_image_size_getter

Use dart file api to get image size, needn't use decode. just read the metadata.
Apache License 2.0
64 stars 29 forks source link

获取宽高相反 #4

Closed peak77 closed 2 years ago

peak77 commented 3 years ago

iOS拍照后的照片,得到图片的宽高值是相反的。比如说下面的图片。正常是3024×4032,但是 ImageSizGetter.getSize(file)得到后是 4032x3024 1

CaiJingLong commented 3 years ago

图片储存的时候会有方向, 这个读取的是jpeg中存储的原始信息

图片实际显示时会根据角度信息进行"纠错", 让你看到的对应上

image

peak77 commented 3 years ago

这个确实是,只能读取原始信息的吗?可不可以读取"纠错"后的信息。因为用户看到的图片的宽高是"纠错"后的,比如说得到旋转了90度的信息,然后纠错一下

dessonchan commented 3 years ago

能加一個 getOrientation 的 method, 返回 vertical / horizontal 的值嗎? 這樣可以知道須不須要糾錯