This PR adds the option to limit resulting file size.
Default view:
Size limit selected:
The Lua entry point is changed to pass settings to the underlying Swift command-line tool (CLI). The CLI's flags are changed, and the logic of finding best quality is added to a new file WriteSizeLimitedHEIF.swift. Its binary search algorithm is in a separate file QualitySearch.swift, which is guarded by a unit test on QualitySearchTests.swift.
Please feel free to let me know if you have any comments. Thanks in advance for reviewing!
(So I was able to work on the limit-file-size option, ref: https://github.com/milch/LRExportHEIC/issues/2#issue-1120319459 , and I managed to get a working version!)
This PR adds the option to limit resulting file size.
Default view:
Size limit selected:
The Lua entry point is changed to pass settings to the underlying Swift command-line tool (CLI). The CLI's flags are changed, and the logic of finding best quality is added to a new file
WriteSizeLimitedHEIF.swift
. Its binary search algorithm is in a separate fileQualitySearch.swift
, which is guarded by a unit test onQualitySearchTests.swift
.Please feel free to let me know if you have any comments. Thanks in advance for reviewing!