Giter VIP home page Giter VIP logo

svg-explorer-extension's People

Contributors

allcontributors[bot] avatar daniel-beardsmore avatar gitmensch avatar kelderek avatar maphew avatar tibold avatar voodoo66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svg-explorer-extension's Issues

DllHost: no Qt platform plugin could be initialized.

After having this program installed and working with no problems, I uninstalled it for unrelated reasons. When I reinstalled it, though, it doesn't work.

I get this error message every time it tries to render an SVG thumbnail in the background:

---------------------------
DllHost
---------------------------
This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.

---------------------------
OK   
---------------------------

SVG files do not render.

Deleting the program and reinstalling it does not resolve the issue.

width and height attributes are ignored on <svg> element, causing svg files which rely on that for clipping to display incorrectly

Simple example:

<svg
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   width="50"
   >
    <g id="bubble1">
        <circle cx="50" cy="50" r="50" />
    </g>
</svg>

This should render as half circle (like the browser does), but the thumbnail preview shows the whole drawing, ignoring the width and height attributes of the root <svg> element.
When the svg file relies on these to clip the image, it is rendered incorrectly.
I think it should render considering those attributes, because the preview should reflect what the image will actually be (e.g. when seeing in a browser).

If the attributes are not present, then it should have the current behavior, considering the whole image.

Some SVGs not render correctly

I use v1.0.19 x64
1.
<svg width="68" height="48" xmlns="http://www.w3.org/2000/svg"><path d="M66.5 7.7c-.8-2.9-2.5-5.4-5.4-6.2C55.8.1 34 0 34 0S12.2.1 6.9 1.6c-3 .7-4.6 3.2-5.4 6.1a89.6 89.6 0 000 32.5c.8 3 2.5 5.5 5.4 6.3C12.2 47.9 34 48 34 48s21.8-.1 27.1-1.6c3-.7 4.6-3.2 5.4-6.1C68 35 68 24 68 24s0-11-1.5-16.3z"/><path fill="#fff" d="M45 24L27 14v20"/></svg>
Must be
изображение
But rendered as
изображение

<svg viewBox="0 0 20 22" xmlns="http://www.w3.org/2000/svg"><path d="M12.08 0H7.92A7.92 7.92 0 000 7.91v3.76c0 3.25 2 6.17 5 7.36v2.43a.42.42 0 00.7.31l2.41-2.19h3.97A7.92 7.92 0 0020 11.67V7.9A7.92 7.92 0 0012.08 0z"/><path d="M10.95 6.77a.42.42 0 10-.23.8 1.9 1.9 0 011.3 1.3.42.42 0 00.8-.23 2.72 2.72 0 00-1.87-1.87z" fill="#fff"/><path d="M14.12 9.26c.04 0 .08 0 .12-.02a.4.4 0 00.28-.51A5.3 5.3 0 0010.9 5.1a.42.42 0 10-.23.8 4.45 4.45 0 013.05 3.05c.05.19.22.3.4.3z" fill="#fff"/><path d="M10.72 3.16a.42.42 0 10-.23.8 7.54 7.54 0 015.17 5.17.42.42 0 00.8-.22 8.38 8.38 0 00-5.74-5.75zm4.52 10.22c-.03-.1-.24-.25-.62-.44a18.77 18.77 0 00-.98-.54 17.47 17.47 0 01-.94-.58.54.54 0 00-.23-.06c-.11 0-.25.08-.42.24-.16.16-.31.33-.45.51-.14.19-.28.36-.44.51-.15.16-.28.24-.38.24a.56.56 0 01-.18-.04 1.93 1.93 0 01-.53-.28c-.75-.42-1.4-.9-1.94-1.44A8.68 8.68 0 016.6 9.4a2.98 2.98 0 01-.19-.37.56.56 0 01-.04-.18c0-.1.08-.23.24-.38.15-.16.32-.3.5-.44.2-.14.36-.29.52-.45.16-.17.24-.3.24-.42a.54.54 0 00-.06-.23 19.62 19.62 0 00-1.12-1.91c-.19-.4-.34-.6-.44-.63a.46.46 0 00-.17-.03 3.27 3.27 0 00-1.15.26c-.27.11-.56.45-.87 1a3.2 3.2 0 00-.17 2.84 31.96 31.96 0 00.32.87c.19.54.42 1.02.68 1.44.44.7 1.03 1.44 1.78 2.19s1.48 1.34 2.19 1.78a7.5 7.5 0 001.85.83 32.92 32.92 0 00.85.3 3.6 3.6 0 00.9.12 3.2 3.2 0 001.54-.42c.56-.3.9-.6 1.01-.87a3.25 3.25 0 00.23-1.32z" fill="#fff"/></svg>
Must be:
изображение
But rendered as
изображение

<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M14.3 1c-.7.1-3 .7-3.3 4a5.2 5.2 0 011.8 9.8A5.3 5.3 0 014.7 11c-1-6 4-10.2 9.5-10A10 10 0 000 10a10 10 0 1014.3-9z" fill="#F91600"/></svg>
Must be:
изображение
But rendered as
изображение

<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 0A10 10 0 000 10.4C2.6 6 6 5.3 6.2 5.3V5a2.2 2.2 0 11.5 1.4c-4 2.5-5 8.1-4.9 9.2l1.5 1.8A15 15 0 0113.3 9a2.2 2.2 0 11.5 1.4 11.5 11.5 0 00-6.7 9A10 10 0 0020 10 10 10 0 0010 0z" fill="#FBB616"/></svg>
Must be:
изображение
But rendered as
изображение

I can provide more examples if need, but I think reason is same for all.

how I can fix render of this svg?
I use SVGOMG for build it.

Please add to readme: how-to-use instructions/results expected after installation

Such as: "This is an Explorer extension so there's nothing further to do and no application to run. After installation just navigate in File Explorer to a folder that contains SVGs, and you'll see the contents of those files as their thumbnails, rather than generic icons. If you have the Preview pane open, you'll see a bigger thumbnail there." Needs work on the wording but I hope that gives you the gist of my request. A screenshot would be helpful, perhaps.

Just a little info of this sort, as obvious as it may seem, would be helpful in general for some I think, and would definitely make it clear that when nothing happens after installation something is wrong. That's my situation: I'm pretty sure but not certain, since nothing is said one way or the other, that after you install (the correct version) and then run the little set of system commands, it's supposed to be that nothing further is required: when you browse/Explore you see your SVGs. But since that didn't work for me I'm left wondering: am I missing something, or did the install procedure just not work for me? Am I supposed to manually register the DLL? I will eventually reboot but is that likely to work if the iconcache clearout didn't?

Thank you.

Background No Longer Transparent but Black

No longer is the transparency of the SVG in the preview! The transparency is replaced with a black background which makes any black SVG's fully unviewable in explorer. The SVG needs to display like how a png would in explorer (keep the transparent part of the image transparent)

"This application failed to start becuse no Qt platform plugin could be initialized"

After installing the x64 version on Windows 10 1809 x64, I only get the following error:

"This application failed to start becuse no Qt platform plugin could be initialized. Reinstallling the application may fix this problem."

error

I myself develop Software with Qt 5, so my PATH is full of directories containing Qt5 DLLs in various versions. Could that be an issue, that SvgExplorerExtension picks the wrong Qt5Core dll?

Windows 10 Explorer doesn't autorefresh after creating/deleting a file/folder

Hi,
I've just installed this app on my Windows 10 64-bit and I'm having the following issue. My Explorer doesn't autorefresh after creating/deleting a file/folder. I've tried several things. Uninstalling the app and event this https://answers.microsoft.com/en-us/windows/forum/windows_10-files/win-10-64-bit-file-explorer-auto-refresh/703492e6-dffb-4344-9699-7e41b2c4ddee?auth=1 But nothing helped. Is there a way how to remove the app completely and revert any system change it did? Uninstalling it via Windows "Add or remove programs" just wasn't enough. It seems that it still left some of it's folder/files.

Thanks.
Jiri

Cannot install : Unknown publisher

Working at a company that blocks installs from unknown publishers. I cannot bypass this with "run anyway" that option is not present.

image

Anyway to not get this warning from Microsoft?###

Build environment

This an is incredibly popular project considering it has no maintainer and no developers. I've decided to see if I can learn "just enough" c++ to build what's here (create a binary release). This issue will summarize the successes on the way to that goal, if any.

Setting up the build environment.

Warning: it's many GB.

  • QtCreator - choco install qtcreator
    • Qt SDK - MSVC 2017 64-bit using Qt Maintenance Tool installed with QtCreator
  • MS Visual Studio - build tools only else many many GB! Reboots necessary, read the notes
    • choco install visualstudio2017buildtools
    • choco install visualstudio2017-workload-vctools
  • Windows SDK - choco install windows-sdk-10.-0

Installation is with Chocolatey wherever I have a choice. The list may be incomplete. I've installed and uninstalled several different programs and versions of programs trying to find the right combination.

Current Status

2019-09-09 as of commit a02ff34 all compiler errors are gone.

SVG explorer 011 not working windows 64 pro

Hi

Just installed the 64 version of the SVG explorer extension and it is not working, I still have the IE icon on a svg file.

here is what I have done so far

  • tried the "change open with"
  • tried killing explorer, remove all icon and thumbail .db, reboot
  • tried the Disk cleanup

nothing get the explorer to display any SVG thumbnail

Is it possible to drop QT-dependency?

This issue is primarily intended as a real question - is there anything else QT is used for than the actual SVG->"preview" part? Can this be done with a more lightweight dependency, too?

I guess the "os-portable" part of QT is completely irrelevant for this "Windows Explorer" plugin, isn't it?

<use> tags are not rendered when they are before their referenced elements

Simple example:

<svg
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   >
    <use
       x="120"
       y="0"
       xlink:href="#shape"
       />
    <g id="shape">
        <rect x="50" y="50" width="50" height="50" />
        <circle cx="50" cy="50" r="50" />
    </g>
</svg>

This should render as 2 shapes (like the browser and Inkscape do), but the thumbnail preview only shows 1 shape, not recognizing the <use> tag.
When the use tag is after the referenced element, both shapes are shown correctly.

I didn't test it, but it is possible that other tags with the href or xlink:href attribute also have this incorrect behavior.

If this bug is in an external library (Qt?) then where should the issue be submitted?

<tspan> tag with x and y attributes not being rendered correctly

Simple example:

<svg
   xmlns="http://www.w3.org/2000/svg"
   height="45" width="200">
  <text x="0" y="15">
  <tspan x="0" y="15">Above</tspan>
  <tspan x="0" y="30">Center</tspan>
  <tspan x="0" y="45">Below</tspan>
  </text>
</svg>

This should render each <tspan> in a separate line, but the preview is not doing this. It is ignoring either the <tspan> tag or its x and y attributes.

Oddly enough, unlike #4, the width and height attributes on the root element, are not ignored in this example.

The preview in the image import dialog in Office (PowerPoint) only works after the images have been displayed as a preview in Windows Explorer

The preview in the image import dialog in PowerPoint only works after the images have been displayed as a preview in Windows Explorer.

The error is reproducible on all our PCs. Only after the preview has been displayed once in Windows Explorer (no matter if large symbols or very large symbols ...) does the preview also work in the Insert image dialog under Office. Otherwise only a symbol image (e for Internet Explorer) is displayed.
We are using Windows 10 (1709) 64Bit and Office 2016 (16.0.9126.2356) 32Bit

switch `maphew` refs to `tibold`

Scattered throughout there are paths and other references to maphew/svg-explorer-extension that will need to be converted to tibold/svg-explorer-extension once #7 is complete. This is a collector issue for those references (e.g. treat opening comment as a wiki)

  • Readme.md - installer locations; CI build status
  • appveyor.yml - auth token
  • .all-contributorsrc
  • SVGThumbnailExtension\SVGThumbnailExtension.pro.user
  • SVGThumbnailExtension\ThumbnailProvider.cpp

create installer

It would be best if we can get the CI build to create it (would also fix #22).

To create the installer the following things would be needed:

Option 1

Get rid of the install shield scripts and start a new installer based on WiX or Inno or NSIS. Seems to be more work than option 2 but also seems to be better prepared for the future.

Option 2

Stay using proprietary InstallShield (either someone has a version and can do the steps or we'd be stuck to VS2015 which gives the option to use Install Shield LE)

  • update the installer scripts SVGThumbnailExtension.iss and SVGThumbnailExtension_x64.iss
    • update meta data (the URLs are all broken and the names can use an update, no need for a sub-folder under programfiles above the extension folder)
    • ideally include the version number from somewhere else (check if this is possible)
    • use paths of the "new" build system

Any opinions?

Optional for every case: check if someone sponsors a certificate to be used for the binaries and the installer.

[Feature Request] Revert to default SVG Icon for Invalid SVG

Currently if there's an invalid SVG icon, the preview will display a transparent image with some text (It's a bit hard to read, but I think it says "Invalid SVG File" in red)

ex

Windows displays invalid images (jpg, png, webp) using the default file icon, and I was thinking using the default svg icon of (whatever viewer they use IE, AI, ImageGlass, ... ) would be more consistent.

Is the current behavior intended?

Document appveyor build settings

The way I've set this up, the Appveyor continuous integration system settings are not stored in the source code repo. The docs state that one can use either the web UI or an appveyor.yml file in the repo. Also some UI settings are just not available in the .yml file. For the present at least we'll stick with the UI approach.

So, I need to document how things have been set up to get to where we are now, so that someone else can do the same without having to spend as much time with trial and error as I have.

provide pgp signatures for releases

It is good to explicit list the hashes for the installers as it is done now (= ensuring that the binary was not tinkered with or got broken afterwards).
It would be even better to provide pgp signed source snapshots and binaries as this additional ensures that both were actually released by @tibold (as soon/long as his public key is known).

Feature Request: checked background for transparent SVG.

Thank you for this great project !
Can't thank you guys enough.

Just one thing, that would be convenient to add.

I have a lot of SVG files with white lines in it. That's basically, because these SVG files are used on websites with dark backgrounds.

afbeelding

The preview isn't really useful in those cases. But would be if there was a grayish background instead.

For a more universal solution. My proposal is to render SVG images with an additional checkered background. That's also how Google renders previews of images on their image search website. As a bonus, it also makes it instantly visible if there is a white background or a transparent one.

afbeelding

Kind regards

Figure out how to test and install build results

Now that the build environment appears to be resolved (#18). Next up is to figure out how to test and install the results.

For testing it might be enough to grab the .dll's in https://github.com/maphew/svg-explorer-extension/tree/master/build-SVGThumbnailExtension-Desktop_Qt_5_12_3_MSVC2017_64bit-Debug/debug and replace the same wherever the same exist on a system that has a previous release installed.

I've no idea yet how to create an installer.

Installer: failed to start because no Qt platform plugin could be initialized

When running the 64 bit installer for maphew appveyor dev release (fake v1.0.30) at the end regsvr32 reports "This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem."

Followed by:

Error
C:\Program Files\Dotz Softwares\SVG Explorer Extension\SVGThumbnailExtension.dll
Unable to register the DLL/OCX: RegSvr32 failed with exit code 0xC0000409.
Click Retry to try again, Ignore to proceed anyway (not recommended), or Abort to cancel installation.

Win10 Enterprise 1803 build 17134.1130

File explorer preview not working in certain view modes

This report is basically a copy and paste from my superuser forum question here

My Windows version is Windows 10 Home (more specifically, update 1809). My computer is x64 system, so I used that version. After installing the extension, I changed the default app, as suggested here but nothing changed.

I got curious and changed view setting in file explorer and found that when the view is set to Small icons/List/Details, I cannot preview the svg files(icon becomes whatever the default app is), but in other modes, like tiles, I can view the previews. Additionally, I have found that regardless of the view mode, preview in the Details pane(panel at the right edge of the file explorer) works. I have rebooted my pc and restarted explorer through task manager countless times. I also tried to remove the file association for .svg files entirely, hoping that would stop the icons from becoming the default app's. However, The default app just switched to internet explorer and I was not able to fully remove the file association.

Project Maintainer(s) wanted

I imported the svg-explorer-extension from CodePlex posted here to GitHub because I use the extension and I didn't want to lose access to it when CodePlex shut down in 2017.

I'm primarily a python guy and am ill equipped to maintaining this project. So if you know C++ and have some time to spare, please feel free to take over! In the meantime I'm happy to merge pull requests for those who care to offer drive-by fixin's but can't vet them for quality or completeness. ;-)

cheers, Matt

  • Transfer to Tibold (started)
  • #42 update paths

Continuous Integration for auto tests and builds

Set up CI to run automatic tests on the code and, if all goes well, also build binaries for release and distribution. I'm not set on GitHub Actions vs Travis CI vs {whatever}; just trying what's close at hand first.

The 'test' in subject refers to "does the code compile" testing, not "does the extension actually work" testing in #22.

I treat this first comment as wiki page, updating periodically so pertinent info is always at top.

Current Status

Appveyor: builds are working - https://ci.appveyor.com/project/maphew/svg-explorer-extension/history - but I don't know what do with them yet, other than verify that new commits don't break the compile

GitHub Actions: not ready for Windows + Qt. Qt must be installed manually and that is not all straightforward.

TravisCI: not tried

Fman Build System: not tried (https://build-system.fman.io/)

Help with uninstall

Hi,

Thank you for creating this project!
Unfortunately I need to remove it from one of the machines and I do not find any entry in the add/remove programs. Caan anyone help me with the right way to remove the program?

Many Thanks

Can't see .svg thumbnails in Onedrive's folder

Problem

The svg explorer extension is not working inside the onedrive folder, where I synchronise my work to the cloud.

Solution

Go into Settings and disable the Save space and download files as you use them option.

With the option enabled files are uploaded to OneDrive and only a "ghost" file is left in its place until you open it, at which point the file is downloaded once again and the extension makes a preview image.

Hat tip to @digitalchet for figuring this out.

RegSvr32 failed with exit code 0x3

When I try to install on a fresh Windows 10 Pro install, the install fails with the following message:

C:\Program Files\SVG Explorer\Extension\SVGThumbnailExtension.dll

Unable to register the DLL/OCX: RegSvr32 failed with exit code 0x3.

I have narrowed it down to there being no VC runtime installed on the computer. The installer tries to register the DLL before installing the VC runtimes. If I manually install the one packaged with the installer and rerun the install, it works fine. I have also tried with the 2015 VC runtime and it works (and then installs the 2017 VC runtime).

The installer needs to run the VC install before attempting to register the DLL.

I have tried with 1.0.0 and the current dev build. I think you could use the PrepareToInstall function of Innosetup to install it before copying the rest of the files:
https://www.jrsoftware.org/ishelp/index.php?topic=scriptevents

SVG's are all black in the preview

Love this tool, but when al svg's are turned black it becomes useless.
Currently viewing a folder with svg's of country flags.
They all turn into the same generic shape and all detail is lost.
2018-06-14 10_24_29-window

wrong qt include paths?

I try to compile this extension with an old QT version and it seems some paths are not setup correct (some of the includes use sub-paths, others not).

While I'm still in the process to check if this actually works out or not, these are the current changes needed - are those fine to be done in general or should there be an ifdef guard around this?

-#include <QSvgRenderer>
-#include <QString>
-#include <QDateTime>
+#include <QtSvg/QSvgRenderer>   // guess that's fine as we use it in common.h
+#include <QtCore/QString>  // other files from QtCore are used in different places
+#include <QtCore/QDateTime>

When this is clear I'll finish my changes and PR them.

Shorter project name?

'SVG Explorer Extension' is rather long to say and type. What about see-svg or svg-see instead?

The 2nd embeds a nice recursion. ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.