Giter Site home page Giter Site logo

alvinhochun / kritashellextension Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 7.0 1012 KB

Shell Extension for Krita files in Windows Explorer to provide thumbnail support and metadata info.

License: MIT License

C++ 52.48% CMake 4.47% NSIS 39.95% Batchfile 3.10%

kritashellextension's Introduction

Krita Shell Extension

Shell Extension to provide various information about Krita files in Windows Explorer.

You can download Krita at https://krita.org/

License

The MIT License

Copyright (c) 2016-2022 Alvin Wong

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgement

This software uses the following libraries:

For the license information on these libraries, you can either refer to the above URLs, or refer to the corresponding COPYING files included in the source tree and/or binary release package.

System Requirements

This shell extension requires Windows Vista or above. It does not work on Windows XP and previous versions of Windows.

The released installer checks for Windows 7 or above, so it can not be used directly on Windows Vista.

The binaries were compiled using Visual Studio 2015. They are linked statically against the C++ runtime, so no extra runtime libraries are needed for this to work.

Installing

Executing the installer should work without any trouble.

Installing the shell extensions by regsvr32 is not supported.

Using

Once this library is registered on the system, it will automatically work inside Windows Explorer and other shell components (e.g. File Dialogs) without needing further actions.

Building From Source

The project has been compiled and tested with CMake 3.4.3 using both NMake Makefile and Visual Studio 2015.

External libraries should be automatically downloaded and compiled by the build system. You can also choose to download their sources manually by replacing deps/CMakeLists.txt with deps/CMakeLists_uselocal.txt. Note that you may need to change the CMakeLists.txt of libzip manually to add the static library target.

You have to build the 32-bit and 64-bit versions separately. Using an out-of-source build location is recommended.

Example build commands:

  • Visual Studio 2015 64-bit build:

      cmake -G "Visual Studio 14 2015 Win64" <path_to_source>
      cmake --build . --config Release
    
  • NMake (within Visual Studio command prompt):

      cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release <path_to_source>
      cmake --build .
    

Currently, the project does not include an install target. You will have to copy the output manually or using an external script. The output DLL is located at

<build_dir>\KritaShellExtension\<config>\kritashellex##.dll

or

<build_dir>\KritaShellExtension\kritashellex##.dll

depending on the generator you use, where ## is the target architecture.

To build the NSIS installer, refer to the readme file under installer/nsis.

Additional Information

KritaThumbnailProvider

Provides preview thumbnail for .kra and .ora files.

KritaPropertyHandler

Provides image file properties for .kra and .ora files. Additional registry changes are needed for it to work the best.

zip_source_IStream

Utility allowing libzip to read zip archives directly from the COM interface IStream without needing to load the content of the entire stream into memory beforehand, saving some time and reducing memory usage.

kritashellextension's People

Contributors

alvinhochun 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

Watchers

 avatar  avatar  avatar

kritashellextension's Issues

Decouple the Krita installer scripts

In short: move the Krita installer scripts to the Krita repository.

There is absolutely no reason to keep it here. This shell extension is rarely updated (as for now), but the Krita installer would need to be updated to match the feature set of Krita.

I'll need to find a way to to make this work.

Check colourspace of mergeimage in .ora files

It seems that the colourspace and blending of the mergedimage.png in .ora files is different from that .kra files? The rendering (alpha blending) behaviour of them in the preview pane seems a bit different.

Allow new versions of the shell extension to be installed over the one bundled with the Krita installer

Currently, the Krita installer force-remove the shell extension, and the shell extension won't install if Krita is installed.

The ultimate idea is to allow the user to install a newer version of the shell extension over an existing Krita installation, so to allow the user to update the shell extension without updating Krita (which is, btw, not exactly the intended use.)

If a new version of the shell extension is installed, then the Krita uninstaller would need to properly uninstall the new version. Three ways to deal with this:

  • Embed the shell extension installer within the Krita installer. The shell extension installer has to accept path to krita.exe from the command line. When uninstalling Krita, just execute the shell extension uninstaller too.
    • It just seems weird?...
  • Save install log and use it in the uninstaller, the shell extension installers can change the install log or place a new install log, so that the uninstaller can use them to remove the new version of the shell extension properly
    • Probably the cleanest way, but how should I generate the install log?
  • In the Krita uninstaller, look for the uninstaller for the shell extension, and use it to uninstall the shell extension instead of using the included functions.
    • Probably the easiest way.

Small preview is stretched to 256px on the longest edge

The image is still stretched even when the longest edge of the image is below 256px. This causes a jump in resolution when resizing the preview pane past the 256px size switch.

Maybe we should use the mergedimage.png in that case.

Refactor the code that involves reading stuff from the files

The thumbnail provider is going to need to read the file dimensions... make it so thatj the related code is extracted from the property handler into its own class.

Probably have a class to handle stuff, including lazy-init getters and stuff.

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.