Skip to content

Commit

Permalink
Make ini paths absolute, push version, update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicibo committed Aug 18, 2023
1 parent 6177987 commit c6ae81d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ This is the client executed when you download the stand-alone binary or when you

The GUI supports two output format: SUP and PES+MUI (Scenarist BD).

### GUI config.ini
The config.ini file can be used to specify the relative or absolute path to a quantizer binary (either pngquant[.exe] or libimagequant[.dll, .so]). If the program is in PATH, the name is sufficient. An external quantizer will offer higher quality than the common Python ones (Pillow or a K-Means clustering) and be, in general, faster.

On UNIX systems, pngquant is fairly easily to get in your PATH via brew, apt-get and so on.

## Command line client
`supercli.py` is essentially the command line equivalent to `supergui.py`.

Expand Down
4 changes: 2 additions & 2 deletions SUPer/__metadata__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"""

__MAJOR = 0
__MINOR = 1
__REVISION = 9
__MINOR = 2
__REVISION = 0

__name__ = "SUPer"
__version__ = '.'.join(map(str, [__MAJOR, __MINOR, __REVISION]))
Expand Down
2 changes: 2 additions & 0 deletions supergui.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ def get_value_key(config, key: str):
CWD = Path(os.path.abspath(Path(sys.argv[0]).parent))
config.read(CWD.joinpath('config.ini'))
exepath = get_value_key(config['PILIQ'], 'quantizer')
if not os.path.isabs(exepath):
exepath = str(CWD.joinpath(exepath))
except:
exepath = None
if Quantizer.init_piliq(exepath):
Expand Down

0 comments on commit c6ae81d

Please sign in to comment.