In some situations, especially on iOS, the device available memory can be maxed out be a large scan. Especially if we scan multiple files, in the current architecture all scans are kept in-memory up until they are saved by the Application.
It should be doable to scan to a file direct, appending data using an NSFileHandle, and generating previews using Data(contentsOf: URL, options: .mappedIfSafe) as the CGImage data provider.
It would be extremely harder though to support exotic image formats like RGB 1bit that require manipulating data that was already scanned.
This is currently not a priority
In some situations, especially on iOS, the device available memory can be maxed out be a large scan. Especially if we scan multiple files, in the current architecture all scans are kept in-memory up until they are saved by the Application.
It should be doable to scan to a file direct, appending data using an
NSFileHandle, and generating previews usingData(contentsOf: URL, options: .mappedIfSafe)as theCGImagedata provider.It would be extremely harder though to support exotic image formats like RGB 1bit that require manipulating data that was already scanned.
This is currently not a priority