2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. //
  2. // SCManagedCapturerUtils.h
  3. // Snapchat
  4. //
  5. // Created by Chao Pang on 10/4/17.
  6. //
  7. #import <SCBase/SCMacros.h>
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. SC_EXTERN_C_BEGIN
  11. extern const CGFloat kSCIPhoneXCapturedImageVideoCropRatio;
  12. extern CGFloat SCManagedCapturedImageAndVideoAspectRatio(void);
  13. extern CGSize SCManagedCapturerAllScreenSize(void);
  14. extern CGSize SCAsyncImageCapturePlaceholderViewSize(void);
  15. extern CGFloat SCAdjustedAspectRatio(UIImageOrientation orientation, CGFloat aspectRatio);
  16. extern UIImage *SCCropImageToTargetAspectRatio(UIImage *image, CGFloat targetAspectRatio);
  17. extern void SCCropImageSizeToAspectRatio(size_t inputWidth, size_t inputHeight, UIImageOrientation orientation,
  18. CGFloat aspectRatio, size_t *outputWidth, size_t *outputHeight);
  19. extern BOOL SCNeedsCropImageToAspectRatio(CGImageRef image, UIImageOrientation orientation, CGFloat aspectRatio);
  20. extern CGRect SCCalculateRectToCrop(size_t imageWidth, size_t imageHeight, size_t croppedWidth, size_t croppedHeight);
  21. extern CGImageRef SCCreateCroppedImageToAspectRatio(CGImageRef image, UIImageOrientation orientation,
  22. CGFloat aspectRatio);
  23. SC_EXTERN_C_END