react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

fix: inverted video dimensions

Open matinzd opened this issue 3 years ago • 1 comments
trafficstars

Problem

Width and height need to be inverted based on preferredTransform.

Approach

  • Added new method for checking if video is recorded in portrait mode
  • Revert width and height based on orientation

Reference

This fixes #1769.

matinzd avatar Jun 16 '22 01:06 matinzd

Has this been looked into anymore? The problem is super annoying 😢 @ivpusic

gregbrinker avatar Sep 13 '22 15:09 gregbrinker

@ivpusic could you review this PR?

ddikodroid avatar Oct 03 '22 02:10 ddikodroid

@gregbrinker @ddikodroid Can you try these changes and verify it is working properly?

matinzd avatar Oct 03 '22 08:10 matinzd

@matinzd I actually had to flip it lol. Aside from that, it works properly. This is on iPhone 13 Pro Max

withWidth:isPortrait ? [NSNumber numberWithFloat:track.naturalSize.height] : [NSNumber numberWithFloat:track.naturalSize.width]

withHeight:isPortrait ? [NSNumber numberWithFloat:track.naturalSize.width] : [NSNumber numberWithFloat:track.naturalSize.height]

gregbrinker avatar Oct 06 '22 16:10 gregbrinker