d2phap / ImageGlass

🏞 A lightweight, versatile image viewer
https://imageglass.org
Other
7.15k stars 481 forks source link

Support linux please! #614

Open gegewuwuwu opened 4 years ago

d2phap commented 4 years ago

This is a good suggestion even though it's very hard to port the current source code to run on other OS: Linux, MacOS,... I will keep it open to remind me in the future

fire-eggs commented 4 years ago

When .NET Core 3 (with cross-platform support for WinForms) is actually released, the process will hopefully be easier [but not easy!]

fire-eggs commented 4 years ago

Whelp, egg-on-face time: .NET Core 3.x supports WinForms, but only on Windows.

fire-eggs commented 4 years ago

What is ImageGlass able to provide that (e.g.) the Gnome Image Viewer does not?

Gnome Image Viewer has limited image format support. Missing include RAW, BPG, EPS, HEIC, multi-page TIF, etc.

Gnome Image Viewer has:

mirh commented 3 years ago

Putting aside Mono might support enough of a subset of windows forms to run IG, .NET 5 has somewhat of a streamlined path forward from it.

fire-eggs commented 3 years ago

Has anyone tried WINE ?

mirh commented 3 years ago

I just checked both 5.0 stable and the new 6.0, and for some reason it seems to crash even before loading any kind of .net assembly. Which is pretty odd since not even the latest and shiniest and complexest DRM fails inside kernel32.

fire-eggs commented 3 years ago

Welp, that sucks. Thanks for the heads up!

Looking at the WINE test results for the .NET frameworks, it sounds like a pain to install .NET much less run .NET apps.

mirh commented 3 years ago

Not really actually, that bug report is quite overconvoluted on top of old. Somewhere around 2019 it should have been fully supported and usually just a matter of using winetricks -q dotnet48 and you are done. I have yet to find bugs with that, in a lot of programs. And anyway you only need it when the built-in mono doesn't work 100% properly (that happens pretty often though, to be fair).

Mid-way through 2020 though, wine reworked their internals to hell and beyond, and now long story short you'd better install it on an older version, and then update your prefix.

But as I said the bug/crash here doesn't even seem to touch the c# part... I didn't investigate much anyway, since I guess like the guys are overburdened enough atm.

thangarajj commented 2 years ago

Yes it would be great to get this on linux. I tried it in windows and liked it a lot (things like, just hit esc to close the app is exactly what I need), but my primary OS is Manjaro KDE and hoping this will make it's way to linux someday soon! Thank you.

Aikatsui commented 2 years ago

@d2phap you may also able to consider code from scratch, try to make something unbelievable ;) https://github.com/KDE/gwenview https://github.com/nomacs/nomacs (with cross builds) https://gitlab.com/luspi/photoqt (with cross builds) https://www.irfanview.com/ (for see features)

I noticed a random usage rating for imageglass https://libreddit.silkky.cloud/r/kde/comments/omq3o3/is_there_a_gwenview_build_for_windows/ (down? try another instance https://farside.link/)

thangarajj commented 2 years ago

I rediscovered xnview mp, never tried it on linux and it works very well. Thanks for pointing in the right direction!

avmaksimov commented 1 year ago

I rediscovered xnview mp, never tried it on linux and it works very well. Thanks for pointing in the right direction!

But I could open HEIC files. Did you succeed with HEIC?

fire-eggs commented 1 year ago

I rediscovered xnview mp, never tried it on linux and it works very well. Thanks for pointing in the right direction! But I could open HEIC files. Did you succeed with HEIC?

Xnview doesn't support HEIC.

I just tried to run ImageGlass 8.7 under WINE 8.0 and failed.

mirh commented 1 year ago

Even if you install dotnet48?

fire-eggs commented 1 year ago

Even if you install dotnet48?

Yes. I installed WINE, then installed .NET frameworks, then ImageGlass. Every attempt to run any ImageGlass .EXE resulted in an early crash in _start() . Seemed very similar to the crash you mentioned back in early 2021 ...

m1karii commented 10 months ago

@gegewuwuwu why was this issue closed? It is not resolved. ImageGlass does not run under wine. Native builds seem more likely (for both Linux and Mac) after migration to dotnet 6. The only problems (as I see it) would be OS-specific API calls and the dependency for Webview2 runtime which is Windows only and replacing it with cross-platform CEF (Chromium Embedded Framework) or the like would be necessary. If some of the devs could express their opinions on the matter it would be very welcomed.

TheOverpassArsonist commented 9 months ago

At the risk of beating a dead horse, I'd also agree that this could do excellent on linux. Currently in a dual boot now for reasons out of my control and within under a day of just casually using the windows photoviewer I was immediately reminded of why I spent weeks bodging together my own rather quickly. I found this and honestly it feels more like a linux application than a windows one in terms of design, UX, customizability, etc. (I mean even down to editing the toolbar items, that's just something straight out of a Linux application) and I could definitely see it gaining some traction in that space, easily competing with the native image viewers in Gnome or KDE as far as I'm concerned. (plus it being GPL wouldn't exactly hurt) I admittedly can't say anything for certain, but given the quality of the project relative to those other staples I can imagine there would be a good bit of additional support from linux users if it was brought to linux. It's not as much of a night and day difference as windows' photo viewer, but it's still extremely competent and I could see a lot of linux users just preferring it's design and aesthetic to switch.

If it can't happen, it can't happen, but I just thought I'd throw my 2cents in here because the second I saw the tool bar UI I was instantly reminded of Gwenview, and then the general usability, settings, etc. just generally follow the Linux software development ethos far closer than windows' IMO so I think it'd get some good traction among the penguins. (especially if ported natively rather than through wine, but that'd be even more work so, eh. Granted a native port could have it's own benefits as well since AFAIK most Linux GUI libraries have much easier cross platform support and whatnot which could ease maintenance in the long run, but I don't know enough to make any comments on that with certainty.) Eitherway Windows was in much more dire need of a competent image viewer compared to linux is. For some reason basically any 3rd party windows image viewer was just a UX nightmare and this is the first one I've seen that has actually been genuinely high quality.

d2phap commented 9 months ago

Thanks for the above comments.

If some of the devs could express their opinions on the matter, it would be very welcomed.

ImageGlass 8 and the upcoming version 9 are developed with the WinForms framework, which is Windows-only. It's impossible for me to port it to MacOS or Linux. Besides that, I'm only confident with C# and web technology, so I don't want to create a subpar version of ImageGlass for other non-Windows OS.

However, I have recently tried Avalonia and ported the Exif tool of ImageGlass v8 to a separate app, https://github.com/d2phap/ExifGlass (it's still Windows-only though). This is my small step towards making ImageGlass cross-platform.

The most important and challenging component of ImageGlass is the Viewer. In v9.0, I have successfully rewritten it using Direct2D from scratch (99% by myself), whereas v8's Viewer component is based on an open-source library. I haven't conducted any further experiments with Avalonia because my current focus is on finishing v9.0 (it's been more than 2 years).

I still keep an eye on the possibility of making ImageGlass cross-platform, but there are no plans at least for now.

inson1 commented 8 months ago

I would love cross-platform functionality and ImageGlass in Avalonia and not in winforms.

@d2phap You said that Viewer is done or almost done. What is the next big thing missing for cross-platform functionality?

d2phap commented 8 months ago

@inson1 the Viewer is the component that is in charge of rendering the image. It utilizes Direct2D - Windows-only graphic API.

Next big thing is port it to use Avalonia API, then rewrite the app again

mirh commented 8 months ago

Windows forms should be more or less somewhat supported in the latest wine. https://bugs.winehq.org/show_bug.cgi?id=55892

0PandaDEV commented 1 month ago

Any updates on this?

d2phap commented 3 weeks ago

@0PandaDEV This will not happen any time soon because it requires changing entire UI framework.