Skip to content

GeographicaGS/pngquant-py

 
 

Repository files navigation

pngquant-py

[WIP]

Export some handful interfaces for using pngquant in Python via cffi.

pngquant.tiny

Compress png image and reduce its size.

Usage

from pngquant import tiny

# .. get origin image's width & height

with open('origin.png', 'rb') as origin:
    rv = tiny(origin.read(), origin_img_width, origin_img_height)
    with open('compressed.png', 'wb') as compressed:
        compressed.write(rv)

TODO

  • [?] Add setup informations.
  • [?] Add some testcases.
  • [?] Clear some code todos.
  • [?] Add options for interfaces.

About

Export some handful interfaces for using pngquant in Python via cffi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 67.6%
  • C 32.4%