Skip to content
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

Support opening image from URI Scheme (Web-to-App linking) #557

Closed
d2phap opened this issue Jul 9, 2019 · 6 comments
Closed

Support opening image from URI Scheme (Web-to-App linking) #557

d2phap opened this issue Jul 9, 2019 · 6 comments

Comments

@d2phap
Copy link
Owner

d2phap commented Jul 9, 2019

From https://groups.google.com/forum/#!msg/imageglass/l6VPedgl0YE/nJilwYRMDQAJ

I am working on a web based document scanning application now i am trying to add a power full image viewer like Image Glass.

My question is how can i integrate ImageGlass in my Web page that can work on modern browsers like edge,chrome and Firefox without add on or applet or even ActiveX control.

Regards,
Kamran

@d2phap d2phap added this to the Issues 6.0.12.29 milestone Jul 9, 2019
@d2phap d2phap self-assigned this Jul 9, 2019
@fire-eggs
Copy link
Collaborator

And my answer in google groups:

Pretty sure the answer is "you can't". You are limited to the image formats which are supported natively in the browser.
For example, see https://stackoverflow.com/questions/2176991/display-tiff-image-in-all-web-browser

If you want a pure-web solution (i.e no conversion by the user on the client side) the only possible solution is:

  1. User uploads their image to your server
  2. Your server converts it to a browser supported format. You'd use something like ImageMagick for that.
  3. The client browser refreshes, loading the converted image from your server

When you are dealing with an image format with capabilities outside the native browser format, you need to inform the user the image they see at step 3 is merely an approximation.

It'd be educational if someone could tell me different ...
Kevin

@d2phap
Copy link
Owner Author

d2phap commented Jul 9, 2019

@fire-eggs I found a solution actually 😀

This issue makes me remember to mailto:<email>.
We can register a custom protocol imageglass:<path> so that when user clicks on the link, ImageGlass will launch with <path> as argument.

A nice article I found: https://www.meziantou.net/registering-an-application-to-a-uri-scheme-using-net.htm


And of course, user cannot use JavaScript to execute shell command because it's client language.

@d2phap
Copy link
Owner Author

d2phap commented Jul 9, 2019

Ready for testing https://imageglass.org/moon

@d2phap d2phap changed the title Support opening image from URI Schema (Web-to-App linking) Support opening image from URI Scheme (Web-to-App linking) Jul 9, 2019
@fire-eggs
Copy link
Collaborator

Great. And how does that work on Mac, Linux, Mobile phone and other browsers?

@d2phap
Copy link
Owner Author

d2phap commented Jul 9, 2019

I guess this is just internal web app, and ImageGlass only runs on Windows OS, so I think we don't need to worry about other OS 😁

@fire-eggs
Copy link
Collaborator

Works for me! :-)

@d2phap d2phap closed this as completed Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants