-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lepton support #178
base: master
Are you sure you want to change the base?
Lepton support #178
Conversation
src/JPEGView/JPEGView.vcxproj
Outdated
@@ -112,7 +112,7 @@ | |||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat> | |||
<RuntimeTypeInfo>true</RuntimeTypeInfo> | |||
<OpenMPSupport>false</OpenMPSupport> | |||
<LanguageStandard>stdcpp17</LanguageStandard> | |||
<LanguageStandard>stdcpp20</LanguageStandard> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What new language feature is used in the new code that requires cpp20?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact ISO C++20 Standard is not required for my changes. I can revert it back or left it as is to have latest language version support in the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted it back,
Sergei, thanks for the PR and bugfix... I need to review the way the the support has been added. Having an external executable write to a file is not really support the way that JPEGView supports other formats, would likely interact poorly with file change detection, etc, and would be considerably slow when browsing. Since you're already hooked into ImageLoadThread, can you add in support via the lepton library? |
Actually the Lepton library doesn't exist. At least I didn't see it yet. Please let me know if you know any implementation that can be used as the library. Standalone converter works with a temporary file, and it is an only area for a possible improvement. I could try to switch the temporary file exchange to pipes. It could save some time by reducing temporary JPEG file IO operation time. Fortunately, lepton-avx.exe works with pipes well. |
895d580
to
f471de9
Compare
f471de9
to
36ad381
Compare
@SergeiVorobyov I've been swamped with work irl this past week, i'll take a look after this weekend. Before I left off, I was considering looking at the lepton source to extract the relevant parts... it's APL which is GPL compatible. (Thanks for removing the updated project/solution files and squashing the commits. That makes it easier to merge.) Piping
I would like the idea of piping instead of writing to a file and reading back. I think that would at least be partially cleaner. If you can implement that piping, that'd be great Other thoughts I had was, I would also need to test whether this executable idea works in the context of 32-bit and 64-bit, and like, that executable says AVX, whether it supports other environments, or what's the system requirements. Generic similar support methodAnd lastly, if this type of file can be supported by an external executable and then piped into JPEGView, if it can be coded in a generic way which would pretty much support all types of other files with an external executable. Like I was going to investigate and look into your implementation if it can be made to support pretty much any type of file... say, via a config file, like an INI setting or like (just speaking off the top of my head) another config file to support other file types using the same method. |
Added support for Dropbox Lepton image format for images with *.lep extension. lepton-avx.exe has to be downloaded from https://github.com/dropbox/lepton/releases/download/1.2/lepton-avx.exe and placed to JPEGView folder.
Default Lepton parameters can be changed in config:
LeptonToolName=lepton-avx.exe
LeptonToolExtraArgs=-allowprogressive -memory=1024M -threadmemory=128M
FilesProcessedByLepton=*.lep
Examples of Dropbox Lepton images can be found there: https://github.com/microsoft/lepton_jpeg_rust/tree/main/images