objective c - NSdata to writeImageDataToSavedPhotosAlbum bytes not exactly same? -
i trying save nsdata using writeimagedatatosavedphotosalbum.
my nsdata size '49894' , saved using writeimagedatatosavedphotosalbum. if read saved image raw data bytes using alassetslibrary, getting image size '52161'.
i expecting both same. can guide me going wrong ?
below link not providing proper solution. saving image using writeimagedatatosavedphotosalbum modifies actual image data
you can not , should not rely on size, firstly because don't know private implementation , secondly because image data supplied metadata (and if don't supply metadata number of default values applied).
you can check metadata contains resulting asset , see how differs metadata supplied.
if need save same bytes, , / or aren't saving valid image files should not use photo library. instead should save data disk in app sandbox, either in documents or library directory.
Comments
Post a Comment