Code Monkey home page Code Monkey logo

pyguetzli's Introduction

PyGuetzli

Github Discord PYPI Version Build Status License

PyGuetzli is a Python binding for Google’s Guetzli library.

Description of Guetzli from official’s repo:

Guetzli is a JPEG encoder that aims for excellent compression density at high visual quality. Guetzli-generated images are typically 20-30% smaller than images of equivalent quality generated by libjpeg. Guetzli generates only sequential (nonprogressive) JPEGs due to faster decompression speeds they offer.

Documentation

More topics at https://wanadev.github.io/pyguetzli/

Usage Example

Changelog

  • [NEXT] (changes on master but not released yet):
    • Nothing yet ;)
  • v1.0.15:
    • Added Python 3.12 support (@flozz)
    • Removed Python 3.7 support (@flozz)
  • v1.0.14:
    • Guetzli: Apply a better patch to fix the crash caused by a bad access to a vector revealed when compiled with "-D_GLIBCXX_ASSERTIONS" (David Odin)
  • v1.0.13:
    • Added Python 3.11 support
  • v1.0.12:
    • Guetzli: Fixed a crash caused by a bad access to a vector revealed when compiled with "-D_GLIBCXX_ASSERTIONS" (David Odin)
  • v1.0.11:
    • arm64 and universal2 wheels for macOS
    • x86 and x68_64 wheels for musl-based Linux distro (Alpine,...)
    • win32 wheels for Windows (x86_64 were already available)
  • v1.0.10: Python 3.10 support and wheels
  • v1.0.9: Provides prebuilt wheel packages
  • v1.0.8: Updates Guetzli and python dependencies
  • v1.0.7: Fixes unicode issue when installing pyguetzli (#4)
  • v1.0.6: Fixes a typo in compilator options on unix
  • v1.0.5: Adds optimization flags when compiling Guetzli
  • v1.0.4: MS Windows support
  • v1.0.3: Updates Guetzli library
  • v1.0.2: PIL Images: fixes crash with non RGB/RGBA images (grayscale, indexed,…)
  • v1.0.1: Adds --std=c++11 flag when building Guetzli
  • v1.0.0:
    • New and simpler API
    • Built-in function to deal with PIL / Pillow Images
    • Documentation (Sphinx)
    • Guetzli update
  • v0.9.0: Initial release

pyguetzli's People

Contributors

dependabot[bot] avatar flozz avatar kgriffs 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  avatar  avatar  avatar  avatar  avatar

Forkers

kgriffs montykl

pyguetzli's Issues

Build failing on Windows

Hello,

Today I attempted to install pyguetzli on Python3.6.4, on Windows 10

I saved the console output: pyguetzli.txt

I also get the error:

Failed building wheel for pyguetzli

Command "e:\development\github\havenweb\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zoc\\AppData\\Local\\Temp\\pip-build-htfgs80j\\pyguetzli\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Zoc\AppData\Local\Temp\pip-icil3s3g-record\install-record.txt --single-version-externally-managed --compile --install-headers e:\development\github\havenweb\venv\include\site\python3.6\pyguetzli" failed with error code 1 in C:\Users\Zoc\AppData\Local\Temp\pip-build-htfgs80j\pyguetzli\

Apparently the first error message is related to this:

  LINK : fatal error LNK1181: cannot open input file 'C:\Users\Zoc\AppData\Local\Temp\pip-build-htfgs80j\pyguetzli\pyguetzli\..\guetzli\bin\Release\libguetzli_static.a'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX86\\x64\\link.exe' failed with exit status 1181

I hope this helps! :)

Linker issue

Hi,

I have successfully installed pyguetzli using the PIP methoded outlined here: https://pypi.python.org/pypi/pyguetzli but unfortunately when running a simple script in PyCharm I get the following error:

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib‌​/python3.6/site-pack‌​ages/pyguetzli/_guet‌​zli.abi3.so, 2): Symbol not found: __ZN7guetzli7ProcessERKNS_6ParamsEPNS_12ProcessStatsERKSsPSs Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages/py‌​guetzli/_guetzli.abi‌​3.so Expected in: flat namespace in /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages/py‌​guetzli/_guetzli.abi‌​3.so

I've tried reinstalling, reinstalling using homebrew and reinstalling using the PyCharm, but this all yielded the same result.

'nullptr' was not declared in this scope

When I try to "pip install pyguetzli", I got:
'nullptr' was not declared in this scope

And I see the compiler options:
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -I. -IInclude -I./Include -O2 -pipe -fPIC -I/tmp/pip-build-mGtYG5/pyguetzli/pyguetzli -I/tmp/pip-build-mGtYG5/pyguetzli/pyguetzli/../guetzli -I/home/img/.jumbo/include/python2.7 -c build/temp.linux-x86_64-2.7/pyguetzli._guetzli.cpp -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/pyguetzli._guetzli.o

After googling, I was told to use "-std=c++11" opiton. But how can I do it ?

UnicodeDecodeError when loading README.rst

Hi there, I'm getting the following error when trying to install under Python 3 (PyPy3) in Linux:

Collecting pyguetzli (from rhith)
  Downloading pyguetzli-1.0.6.tar.gz (106kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-qo_bojj7/pyguetzli/setup.py", line 58, in <module>
        long_description = open("README.rst", "r").read()
      File "/opt/pypy3/lib-python/3/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 682: ordinal not in range(128)

ModuleNotFoundError

I have downloaded the Pyguetzli via pip install pyguetzli command. But I can't import it.

The error code below:

File "c:/Users/Koray Tuğberk GÜBÜR/Desktop/python_all/Pillow/abc.py", line 1, in
import pyguetzli
ModuleNotFoundError: No module named 'pyguetzli'

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.