You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking into pin_decodedImageWithData method and wandering can't we find better way for decoding ? With current implementation in order to decode an image we are creating additional bitmap with the same size and draw on it. We could draw into 1x1 context like done here , concrete implementations are here. If there may be issues with image orientation(in which I'm not sure) we can do this way only when image is in portrait mode. By doing this way we can save temporary memory of image size.
The text was updated successfully, but these errors were encountered:
There are cases where suggested solution(drawing on 1x1 canvas) will not work correctly. Specifically if we get HEIC encoded image which alpha is not premultiplied we will get wrong decoded image because when compositing layers iOS considers that alpha should be premultiplied. So I think current solution works right, we still can disable interpolation to have better drawing speed.
I'm looking into
pin_decodedImageWithData
method and wandering can't we find better way for decoding ? With current implementation in order to decode an image we are creating additional bitmap with the same size and draw on it. We could draw into 1x1 context like done here , concrete implementations are here. If there may be issues with image orientation(in which I'm not sure) we can do this way only when image is in portrait mode. By doing this way we can save temporary memory of image size.The text was updated successfully, but these errors were encountered: