UIImage+ImageEffects.h 890 B

123456789101112131415161718192021222324252627282930
  1. // Created by Tencent on 2023/06/09.
  2. // Copyright © 2023 Tencent. All rights reserved.
  3. /*
  4. File: UIImage+ImageEffects.h
  5. Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how
  6. to use vImage to efficiently calculate a blur. Version: 1.0
  7. */
  8. @import UIKit;
  9. @interface UIImage (ImageEffects)
  10. - (UIImage *)applyLightEffect;
  11. - (UIImage *)applyExtraLightEffect;
  12. - (UIImage *)applyDarkEffect;
  13. - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor;
  14. - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius
  15. tintColor:(UIColor *)tintColor
  16. saturationDeltaFactor:(CGFloat)saturationDeltaFactor
  17. maskImage:(UIImage *)maskImage;
  18. @end
  19. @interface UIImage (SnapshotImage)
  20. + (UIImage *)snapshotImageWithView:(UIView *)view;
  21. @end