Update some comments and fix typo
This commit is contained in:
parent
6b0ef2e741
commit
c0e34ee391
|
@ -92,7 +92,7 @@
|
|||
|
||||
/**
|
||||
Return the decoded and probably scaled down image by the provided image. If the image pixels bytes size large than the limit bytes, will try to scale down. Or just works as `decodedImageWithImage:`, never scale up.
|
||||
@warning You should not pass a too small bytes limit, the suggestion value should be larger than 1MB. We use Tile Decoding to avoid OOM, however, this will consume much more CPU time because we need to iterate and draw each tile line by line.
|
||||
@warning You should not pass too small bytes, the suggestion value should be larger than 1MB. Even we use Tile Decoding to avoid OOM, however, small bytes will consume much more CPU time because we need to iterate more times to draw each tile.
|
||||
|
||||
@param image The image to be decoded and scaled down
|
||||
@param bytes The limit bytes size. Provide 0 to use the build-in limit.
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
}
|
||||
|
||||
- (void)test07ThatDecodeAndScaleDownImageScaleSmallerBytes {
|
||||
// Check when user provide too smaller bytes, we scale it down to 1x1, but not return the force decoded original size image
|
||||
// Check when user provide too small bytes, we scale it down to 1x1, but not return the force decoded original size image
|
||||
NSString *testImagePath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestImage" ofType:@"jpg"];
|
||||
UIImage *image = [[UIImage alloc] initWithContentsOfFile:testImagePath];
|
||||
UIImage *decodedImage = [UIImage sd_decodedAndScaledDownImageWithImage:image limitBytes:1];
|
||||
|
|
Loading…
Reference in New Issue