diff --git a/utils/pngnq.watch.py b/utils/pngnq.watch.py new file mode 100644 index 000000000..c87719e76 --- /dev/null +++ b/utils/pngnq.watch.py @@ -0,0 +1,47 @@ +""" + pngnq 0watch script for optipng packages from the mingw64 project +""" +from os.path import abspath, join, dirname +import sys +sys.path.insert(0, abspath(join(dirname(__file__), '..'))) +from mingw64watch import get_new_version, \ + get_mingw64_valid_new_package_item_map, \ + get_mingw32_valid_new_package_item_map # noqa: E402 + +NAME = 'pngnq' +FEED = 'pngnq.xml' + +PKG_MAP_64 = get_mingw64_valid_new_package_item_map(NAME, FEED) +RELEASE64 = get_new_version(PKG_MAP_64) + +PKG_MAP_32 = get_mingw32_valid_new_package_item_map(NAME, FEED) +RELEASE32 = get_new_version(PKG_MAP_32) + +if RELEASE64 is None and RELEASE32 is None: + exit() + +if RELEASE64 is None or RELEASE32 is None: + MSG = f"either the 32 or the 64 bit release is not ready for packaging" + raise Exception(MSG) + +if RELEASE64['version'] != RELEASE32['version']: + raise Exception(f"""64bit version {RELEASE64['version']} does not match + 32bit version {RELEASE32['version']}""") + +if RELEASE64['license'] != RELEASE32['license']: + raise Exception(f"""64bit license {RELEASE64['license']} does not match + 32bit license {RELEASE32['license']}""") + +if RELEASE64['packager'] != RELEASE32['packager']: + raise Exception(f"""64bit packager {RELEASE64['packager']} does not match + 32bit packager {RELEASE32['packager']}""") + +if RELEASE64['desc'] != RELEASE32['desc']: + raise Exception(f"""64bit description {RELEASE64['desc']} does not match + 32bit description {RELEASE32['desc']}""") + +RELEASE64['released32'] = RELEASE32['released'] +RELEASE64['pkg_url32'] = RELEASE32['pkg_url'] + +releases = [RELEASE64] +# print(releases) diff --git a/utils/pngnq.xml b/utils/pngnq.xml new file mode 100644 index 000000000..0ba0ec41d --- /dev/null +++ b/utils/pngnq.xml @@ -0,0 +1,55 @@ + + + + pngnq + Pngnq is a tool for quantizing PNG images in RGBA format + Quantizes a 32-bit RGBA PNG image to an 8 bit RGBA palette PNG +using the neuquant algorithm. The output file name is the +input file name extended with "-nq8.png" or a specified extension. + + Graphics + http://pngnq.sourceforge.net/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pngcomp + This program give some basic statistics about the difference between two images. + This program give some basic statistics about the difference between two images. +It was created as a measure of various color quantization methods. + +The statistics given include individual pixel differences and also +block statistics averaged over blocks of pixels. The latter is a better measure +when images have been dithered. + +The use of these statistics is limited in that they do not contain a model of human vision. + + + + diff --git a/utils/pngnq.xml.template b/utils/pngnq.xml.template new file mode 100644 index 000000000..e298ee13c --- /dev/null +++ b/utils/pngnq.xml.template @@ -0,0 +1,44 @@ + + + {name} + {desc} + Quantizes a 32-bit RGBA PNG image to an 8 bit RGBA palette PNG +using the neuquant algorithm. The output file name is the +input file name extended with "-nq8.png" or a specified extension. + + Graphics + {url} + + + + + + + + + + + + + + + + + {packager} + + {released} + + + + + {released32} + + + + + + + + + +