QL-Win / QuickLook

Bring macOS “Quick Look” feature to Windows
http://pooi.moe/QuickLook/
GNU General Public License v3.0
17.58k stars 1.09k forks source link

Switchable preview for SVG images #336

Open Riajyuu opened 6 years ago

Riajyuu commented 6 years ago

While previewing SVGs, I expect a button to toggle between image view and plain text

xupefei commented 6 years ago

This is known. I can't find a good svg2pdf library yet.

Riajyuu commented 6 years ago

@xupefei

svg2dpf

excuse me? I failed to catch up. What I request here is simply to process SVGs as text file, just like opening them in text editor, when hitting the button

xupefei commented 6 years ago

Oh sorry again. I misunderstood again. Now I think SVG files are already previewed as texts.

On Mon, 3 Sep 2018, 19:32 Paddy Xu, xupaddy@gmail.com wrote:

Sorry, it is a typo. Should be "svg2pdf".

What I mean is I can't find a good SVG renderer. Since SVG is a vector format, the best option would be to render it as a PDF, which is also a vector format and can easily be previewed.

On Mon, 3 Sep 2018, 19:13 爆発は芸術です, notifications@github.com wrote:

@xupefei https://github.com/xupefei

svg2dpf

excuse me? I failed to catch up. What I request here is simply to process SVGs as text file, just like opening them in text editor, when hitting the button

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QL-Win/QuickLook/issues/336#issuecomment-418154529, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnBJ78yZCIZwzGsBf4KSFDMzay_NYrcks5uXVVEgaJpZM4WX1o- .

Riajyuu commented 6 years ago

pls allow me to clarify again: I'm requesting adding a button (perhaps) where I squared with red box: image By clicking it, the preview becomes like this: image Click it again and it goes back into image view.

Note that it would be great if you can accomplish syntax highlight like the screenshot in VSC.

But one thing confuses me: do you need any other extra library?

More brainstorming: Perhaps double click it, QuickLook will always preview as text first? (just like caps-look button on some Chinese IME on Android)

xupefei commented 6 years ago

Thanks for the clarification. Now I understand what you mean.

This issue is related to https://github.com/QL-Win/QuickLook/issues/132. It will be a fraction of the next release.

victagon commented 6 years ago

I'm a bit confused. SVG image preview worked just fine in 0.3.5, is removed in 0.3.6 and now apparently added to the enhancement list. I originally installed QuickLook mainly for SVG preview, so I have now downgraded back to 0.3.5.

Personally I don't care much for SVG code preview, I've got my editor for that, but if there will be a toggle: ok. I don't really get why the (image) preview has been removed. Any idea when it will return?

Thanks, Ruud.

xupefei commented 6 years ago

The reason is that we have switched to NConvert to provide faster image previewing since v0.3.6. NConvert, unfortunately, does not support SVG.

WalterMa commented 6 years ago

@xupefei Seems NConvert support SVG. https://www.xnview.com/en/nconvert/#formats

Try to convert svg file by using nconvert 7.20, failed...

frogdesk commented 5 years ago

I would rather the image preview be slow than not work at all.

runxel commented 4 years ago

Not the guy to necromancing, but a true svg preview is much needed and appreciated. At the moment it just shows... some pixel mess? :/

xupefei commented 4 years ago

Since the year 2019 I have been busy with various things: first writing a paper, then drafting a thesis, and now working. I haven't got much time feeling good enough to sit down and implement a complex feature. I would really appreciate if someone can spare some time to implement this feature. The idea is:

  1. Add a new pipe message to preview a file with a specific viewer (now there's only the message to preview a file without specifying a viewer).
  2. Add a button on the top-right side of the previewer (just like the existing EXIF and dark/light switch buttons) for SVG format. The button will call the new pipe message before closing itself.
princeeze commented 2 years ago

Any updates on this yet?

I have had to downgrade to 0.3.5 to view SVGs

rabelux commented 2 years ago

@princeeze SVG previews work fine in the current version. This ticket is about switching between source and image view.

princeeze commented 2 years ago

Are you sure about that? I couldn't preview svg files. I had to downgrade for it to work.

rabelux commented 2 years ago

I tested it and it works. Have you tried different SVGs?

Hard-Wired commented 1 year ago

Such a switch for all file types would be useful as well as turning off previews for file types like .url (Internet Shortcut).