|
@@ -370,14 +370,15 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
|
|
|
#if SD_UIKIT
|
|
|
// See: https://developer.apple.com/documentation/uikit/uiimage/3750834-imagebypreparingfordisplay
|
|
|
// Need CGImage-based
|
|
|
- if (@available(iOS 15, tvOS 15, *)) {
|
|
|
- UIImage *decodedImage = [image imageByPreparingForDisplay];
|
|
|
- if (decodedImage) {
|
|
|
- SDImageCopyAssociatedObject(image, decodedImage);
|
|
|
- decodedImage.sd_isDecoded = YES;
|
|
|
- return decodedImage;
|
|
|
- }
|
|
|
- }
|
|
|
+ //hxd del 20240710
|
|
|
+// if (@available(iOS 15, tvOS 15, *)) {
|
|
|
+// UIImage *decodedImage = [image imageByPreparingForDisplay];
|
|
|
+// if (decodedImage) {
|
|
|
+// SDImageCopyAssociatedObject(image, decodedImage);
|
|
|
+// decodedImage.sd_isDecoded = YES;
|
|
|
+// return decodedImage;
|
|
|
+// }
|
|
|
+// }
|
|
|
#endif
|
|
|
|
|
|
CGImageRef imageRef = image.CGImage;
|
|
@@ -391,6 +392,13 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
|
|
|
format.opaque = !hasAlpha;
|
|
|
format.scale = image.scale;
|
|
|
CGSize imageSize = image.size;
|
|
|
+
|
|
|
+ //hxd add 20240710
|
|
|
+ if(imageSize.width > 640){
|
|
|
+ imageSize.height = imageSize.height/(imageSize.width/640.0);
|
|
|
+ imageSize.width = 640.0;
|
|
|
+ }
|
|
|
+
|
|
|
SDGraphicsImageRenderer *renderer = [[SDGraphicsImageRenderer alloc] initWithSize:imageSize format:format];
|
|
|
UIImage *decodedImage = [renderer imageWithActions:^(CGContextRef _Nonnull context) {
|
|
|
[image drawInRect:CGRectMake(0, 0, imageSize.width, imageSize.height)];
|