ImageGlass icon indicating copy to clipboard operation
ImageGlass copied to clipboard

Support linux please!

Open gegewuwuwu opened this issue 4 years ago • 24 comments

gegewuwuwu avatar Aug 28 '19 05:08 gegewuwuwu

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

d2phap avatar Aug 28 '19 14:08 d2phap

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

fire-eggs avatar Aug 28 '19 15:08 fire-eggs

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

fire-eggs avatar Mar 12 '20 19:03 fire-eggs

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:

  • thumbar
  • slideshow
  • details / metadata view
  • handles all but the very largest images
  • print
  • wallpaper
  • rotate w/ cancel-able save

fire-eggs avatar Apr 08 '20 19:04 fire-eggs

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.

mirh avatar Jan 19 '21 16:01 mirh

Has anyone tried WINE ?

fire-eggs avatar Jan 19 '21 16:01 fire-eggs

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.

mirh avatar Jan 22 '21 13:01 mirh

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.

fire-eggs avatar Jan 23 '21 15:01 fire-eggs

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.

mirh avatar Jan 23 '21 17:01 mirh

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.

thangarajj avatar Feb 12 '22 20:02 thangarajj

@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/)

Aikatsui avatar Feb 13 '22 10:02 Aikatsui

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

thangarajj avatar Feb 13 '22 20:02 thangarajj

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?

avmaksimov avatar Feb 05 '23 20:02 avmaksimov

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.

fire-eggs avatar Feb 06 '23 00:02 fire-eggs

Even if you install dotnet48?

mirh avatar Feb 06 '23 18:02 mirh

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 ...

fire-eggs avatar Feb 06 '23 23:02 fire-eggs

@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.

m1karii avatar Aug 25 '23 15:08 m1karii

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.

TheOverpassArsonist avatar Sep 26 '23 12:09 TheOverpassArsonist

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.

d2phap avatar Sep 26 '23 13:09 d2phap

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?

inson1 avatar Nov 19 '23 04:11 inson1

@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

d2phap avatar Nov 20 '23 13:11 d2phap

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

mirh avatar Nov 21 '23 20:11 mirh