While picking image from UIImageController
and calculating its size there is variation in image size i.e. size of image in disk is different.
Is there a way to get proper size?
What I have tried -
- Converting image to data using
UIImagePNGReprensentation
&UIImageJPEGReprensentation
. The problem with this approach -
a. This approach is memory consuming, so doesn't looks good.
b. Size vary, I can understand that it convert image to data and then calculate size, so size is different.
But whatever I have searched, every accepted answers is around this only.
- Using
ALAssetsLibrary
to get the image size, but size calculated from this also doesn't match the disk size.
I have used following method - assetForURL: resultBlock:^(ALAsset *asset) failureBlock:
- Using
CGImageRef
methodsCGImageGetBytesPerRow
, but this also does't give desired result.
Any other approach which I have missed?
Aucun commentaire:
Enregistrer un commentaire