Swift finds another way to quickly generate thumbnails of pictures

insert image description here

Functional Requirements

In App development, creating image thumbnails is a very common operation. But how to quickly and conveniently generate a thumbnail of a specified size for a super-large picture?

insert image description here

As shown in the picture above: we generate thumbnails almost 27 times faster than conventional methods! And the generated code does not use any third-party library, it is completely  native implementation.

In the demo above, there are several pictures in digital camera raw data (.DNG) format, each of which is nearly 80 MB (48 million pixels, 8K resolution), and it is quite time-consuming to create thumbnails in the conventional way!

So, how does the extreme speed method do it so fast?

Guess you like

Origin blog.csdn.net/mydo/article/details/132721743