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 need to know view's dimensions in order to apply a custom Transformation (cropping based on a machine learning model). But I'm not able to find a way of delaying the computation until view has been measured using Picasso's api. Is there a way to delay the Transformation.transform call until the target view has been measured?
As this transformation plans to be part of a library I want to ship this feature as a custom Transformation to play nicely with any other potential transformations.
Thanks.
The text was updated successfully, but these errors were encountered:
The problem with using fit() is that if I don't add any built-in Picasso transformation the bitmap is stretched when it reaches Transformation.transform of my custom Transformation. If I apply centerCrop() it defeats the purpose of my custom transformation for making its own cropping, and if I use centerInside() the bitmap is rescaled in a way that is not optimal for the incoming crop -min(width, height). But if I don't use fit then I get the original bitmap with its entire size loaded into memory being that way exposed to potential OMM.
Glide offers BitmapTransformation which supplies to its clients a bitmap optimized for to the target view, downscaling the original bitmap but taking the greater dimension of the target view - max(width, height). Is there something similar in Picasso?
I need to know view's dimensions in order to apply a custom Transformation (cropping based on a machine learning model). But I'm not able to find a way of delaying the computation until view has been measured using Picasso's api. Is there a way to delay the
Transformation.transform
call until the target view has been measured?As this transformation plans to be part of a library I want to ship this feature as a custom Transformation to play nicely with any other potential transformations.
Thanks.
The text was updated successfully, but these errors were encountered: