SkillAgentSearch skills...

DSResize

HighQuality Image Scaling / Resizing using vImage

Install / Use

/learn @darcwader/DSResize
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

DSResize

HighQuality Image Scaling / Resizing using vImage.

Usage

@interface UIImage (HQResize)
-(UIImage*) hqScaleToSize:(CGSize)size usingMode:(UIViewContentMode) mode;
@end

Comparison with Reference Images

Images are resized to identical sizes.

| Core Graphics | vImage | |---------------|--------| | | | | | | | | | | | | | | |

Computation Time

| Core Graphics | vImage | Image Resolution | slower by | |---------------|--------------|------------------|-----------| | 0.014590 | 0.024121 | 2130x2900 | 1.65 times| | 0.167856 | 0.317625 | 3072x2304 | 1.89 times| | 0.003484 | 0.001751 | 64x64 | 0.50 times| | 0.074183 | 0.146807 | 1000x1247 | 1.97 times| | 0.342612 | 1.761384 | 3744x5616 | 5.14 times|

The slowness of hq image is apparent, but the absolute time it takes for even image is quite small.

References

[http://www.galloway.me.uk/2012/01/uiimageorientation-exif-orientation-sample-images/][1] [http://stackoverflow.com/questions/10068095/uiimage-become-fuzzy-when-it-was-scaled-whyios-5-0][2] [https://github.com/Nyx0uf/NYXImagesKit][3]

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated8y ago
Forks0

Languages

Objective-C

Security Score

70/100

Audited on May 18, 2017

No findings