Skip to content

Commit

Permalink
Fixes #291: Android: width/height options are absolute dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
gre committed May 28, 2022
1 parent 8d04ba4 commit 2d13136
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public void captureRef(int tag, ReadableMap options, Promise promise) {
: Formats.PNG;

final double quality = options.getDouble("quality");
final Integer scaleWidth = options.hasKey("width") ? (int) (dm.density * options.getDouble("width")) : null;
final Integer scaleHeight = options.hasKey("height") ? (int) (dm.density * options.getDouble("height")) : null;
final Integer scaleWidth = options.hasKey("width") ? options.getInt("width") : null;
final Integer scaleHeight = options.hasKey("height") ? options.getInt("height") : null;
final String resultStreamFormat = options.getString("result");
final String fileName = options.hasKey("fileName") ? options.getString("fileName") : null;
final Boolean snapshotContentContainer = options.getBoolean("snapshotContentContainer");
Expand Down

0 comments on commit 2d13136

Please sign in to comment.