Skip to content

Commit

Permalink
Fixes #291: Android: width/height options are absolute dimensions (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
gre authored May 30, 2022
1 parent b31f6cc commit f1096f6
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 f1096f6

Please sign in to comment.