The Perfectly Clear Browser SDK, as you can see running here, corrects images within the client’s browser. This allows images to be corrected with Perfectly Clear without using your business’ servers or compute capacity.
The Browser SDK is powered by Web Assembly, and it first loaded with a single file to be downloaded and cached in the browser. This file is about 3MB at its smallest, or larger depending on which corrections and LOOKs are included.
Once the main library is downloaded and loaded, Perfectly Clear can begin processing images. For an example of processing time, we will refer to the implementation we have in the demo linked above.
The main image preview is 608 x 1080 in size, and processes with our iAuto ’21 preset in 0.212 seconds (Chrome browser on 2018 MacBook Pro), or roughly 3 megapixels per second. Once that is complete, each of the thumbnail images are processed at roughly 0.043 seconds.
WebAssembly itself is single-threaded at this time. However, multiple images can be processed in parallel using Web Workers. This method can dramatically improve performance when rendering thumbnails for a large number of photos, or rendering one photo with several different Presets. For example, 100 thumbnails at each 120×120 pixels can all be corrected with iAuto ’21 in 1.8 seconds on a 2018 MacBook Pro, approximately 4 times faster than using a single thread to process all 100 images.