Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Viewport Ratio not correct when setImageURI is used. #52

Closed
malacavilla opened this issue Jun 15, 2016 · 1 comment
Closed

Viewport Ratio not correct when setImageURI is used. #52

malacavilla opened this issue Jun 15, 2016 · 1 comment

Comments

@malacavilla
Copy link

malacavilla commented Jun 15, 2016

I have code such as:

cropView.setImageURI(imageFileUri);
cropView.setViewportRatio(viewportRatioValue);

The only time the TouchManager's setViewport() code is called is when the we set the viewport. However at this state, the bitmap width/height is 0 (because the Bitmap isn't loaded yet), so we get an imageAspect of NaN, making our viewport non-existent.

@malacavilla
Copy link
Author

This is actually not an issue, see now that it is calculating after Bitmap is set.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant