From 90dc3329d1973fda691e357cf4523d5c7c67fa1d Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期二, 11 三月 2025 12:23:53 +0800 Subject: [PATCH] fix bug --- Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h b/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h index 60b488a..f4c50d3 100644 --- a/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h +++ b/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h @@ -98,7 +98,8 @@ #pragma mark - Image Blending /** - Return a tinted image with the given color. This actually use alpha blending of current image and the tint color. + Return a tinted image with the given color. This actually use `sourceIn` blend mode. + @note Before 5.20, this API actually use `sourceAtop` and cause naming confusing. After 5.20, we match UIKit's behavior using `sourceIn`. @param tintColor The tint color. @return The new image with the tint color. @@ -106,6 +107,16 @@ - (nullable UIImage *)sd_tintedImageWithColor:(nonnull UIColor *)tintColor; /** + Return a tinted image with the given color and blend mode. + @note The blend mode treat `self` as background image (destination), treat `tintColor` as input image (source). So mostly you need `source` variant blend mode (use `sourceIn` not `destinationIn`), which is different from UIKit's `+[UIImage imageWithTintColor:]`. + + @param tintColor The tint color. + @param blendMode The blend mode. + @return The new image with the tint color. + */ +- (nullable UIImage *)sd_tintedImageWithColor:(nonnull UIColor *)tintColor blendMode:(CGBlendMode)blendMode; + +/** Return the pixel color at specify position. The point is from the top-left to the bottom-right and 0-based. The returned the color is always be RGBA format. The image must be CG-based. @note The point's x/y will be converted into integer. @note The point's x/y should not be smaller than 0, or greater than or equal to width/height. -- Gitblit v1.7.1