Git Product home page Git Product logo

metamorphosis's Introduction

Metamorphosis

The Ultimate Cursor Converter

Why

After several researches, i come to the conclusion that it doesn't exist a robust tool performing cursors conversions between the different platform formats. So inspired by cfx2xc.py and sd2xc.pl, i decided to create one very cool.

Requirements

  • Python 3+,
  • PIL (Pillow)
  • xcursorgen
  • tar
  • [Iconolatry](https://github.com/SystemRage/Iconolatry)

Features

  • Extraction of CursorFX / CursorXP theme images and:

    • Conversion to Linux X11 or Windows .ani cursors.
    • Automatic correction for lazy authors' mistakes.
    • Supports default animations or script animations (also with repeat / end repeat loops).
    • Supports clicked cursors ( only extraction ).
  • Conversion of .cur or .ani to X11 cursors.

  • Conversion of X11 to .ani cursors.

  • Generic:

    • Detailed log file creation.
    • Packaging of converted cursors.
    • Allows cursors resizing.
    • Changes cursors color.
    • Generates installations files for destination platform.

Usage

python3 Metamorphosis.py -h for all available options.

Conversion to X11 of an unpaired file and a files folder, packing results as .tar.gz: python3 Metamorphosis.py -i /path/to/folder/with/some/cursors -i /path/to/a/specific/cursor/file/Example3.CursorFX -o /path/converted/cursors -t Linux -p

where an example of the directory and file structure is:

/path/to/folder/with/some/cursors
│   Example1.CursorFX
│   Example2.CurXPTheme
│
└───folder_with_cur_and_ani_1
|    │   Help.cur
|    │   Crosshair.cur
|    |   Arrow.ani
|    |   Button.ani
|
└───folder_with_cur_and_ani_2
     |   SizeNS.cur
     |   SizeS.ani
     |   SizeWE.ani

Conversion to .ani of a files folder, outputting to working directory, resizing and changing original color: python3 Metamorphosis.py -i /path/to/folder/with/some/cursors -t Windows -s 32 -c gbr

where an example of the directory and file structure is:

/path/to/folder/with/some/cursors
│   Example1.CursorFX
│   Example2.CurXPTheme
│
└───folder_with_X11
     │   top-left-arrow
     │   progress
     |   crosshair
     |   pencil

Notes

  • Remember that .cur, .ani or X11 must have standard names.
  • Do NOT distribute the converted themes without the permission of the original author.

License

License: GPL v3 © Matteo ℱan

metamorphosis's People

Contributors

systemrage 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

Watchers

 avatar  avatar

metamorphosis's Issues

TypeError line 902

i experienced a type error in line 902 and it was resolved by converting message to str(message)

Cannot convert X11 theme to something acceptable by Windows

Hello!

I am trying to convert X11 cursor theme made by me to make it work on Windows, but I wasn't able to do that:

~/src/Metamorphosis ./Metamorphosis.py -i ~/src/hand-of-evil/hand-of-evil/cursors -t Windows -o win                                                                                  [code: 130, time: 0,000s]

Metamorphosis working...

---> Processing Input    #0:             `/home/grief/src/hand-of-evil/hand-of-evil/cursors`
------> Start Processing #0:             `cursors` folder
------> Process          #0:             aborted, insert `.ani`, `.cur` or `X11` cursor(s) in a folder.
------> Start Processing #1:             `cursors` folder
------> Start Processing #1.1:           `color-picker`
------> Process          #1.1:           aborted, duplicate file found.
------> Start Processing #1.2:           `X_cursor`
------> Process          #1.2:           aborted, duplicate file found.
------> Start Processing #1.3:           `cross`
------> Process          #1.3:           aborted, duplicate file found.
------> Start Processing #2:             `cursors` folder
------> Process          #2:             aborted, insert `.ani`, `.cur` or `X11` cursor(s) in a folder.
------> Start Processing #2.4:           `zoom-in`
------> Process          #2.4:           aborted, duplicate file found.
------> Start Processing #3:             `cursors` folder
------> Process          #3:             aborted, insert `.ani`, `.cur` or `X11` cursor(s) in a folder.

and so on. No files were created. Here is the theme itself: https://github.com/Grief/hand-of-evil/

SyntaxWarnings and DeprecationWarning

~/Desktop/sources/Metamorphosis/Iconolatry.py:178: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if path is "":
~/Desktop/sources/Metamorphosis/Iconolatry.py:194: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if name is "":
~/Desktop/sources/Metamorphosis/Iconolatry.py:212: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if frmt is "":
~/Desktop/sources/Metamorphosis/Metamorphosis.py:267: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
  def resize_meth(self, image, method = Image.ANTIALIAS):

(Python 3.10.5)

Heuristics.PNG.CVE-2010-1205=Vulnerability

/Metamorphosis/Iconolatry/test_encode/PngSuite/3.12/xc9n2c08.png

/Metamorphosis/Iconolatry/test_encode/PngSuite/3.12/xd0n2c08.png

/Metamorphosis/Iconolatry/test_encode/PngSuite/3.12/xd3n2c08.png

Can you explain this? I am not saying that it is a vulnerability in its entirety, however, I would like to know what it is exactly.

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.