Skip to content

kstenschke/lspng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status CodeFactor

lspng - List PNG attributes (luminance, pixel size) into their filenames

Table of Contents

What does it do?

lspng analyzes and renames PNG image files, so their filenames allow to sort PNGs by luminance. Additionally the pixel size (width x height) of images can be added into their filename.

Command: --version or -v

Print information about installed version of lspng, its license and author(s).

Option: --desc or -d

By default lspng sorts PNGs ordered from lightest to darkest. Running lspng -d will sort/rename the files descending instead, that is from darkest to lightest.

Option: --amount_digits_min= or -a=

Running lspng -a=3 will set a minimum prefix length of three digits. Instead of e.g. 0_foo.png the lightest PNG image than will be named 000_foo.png.

Option: --numeric_only or -n

Running lspng -n will omit the original filenames and rename png files numeric only. Instead of e.g. 0_foo.png the lightest PNG image than will be named 0.png.

Option: --append_luminance or -l

Running lspng -nl - the n will instruct lspng to omit the original filename and name png files numerical. The l instructs lspng to append the image's lightness value, resulting in a filename like: 0_050.png.
The luminance value in percent ranges from 000 (=white) to 100 (=black).

Option: --append_px_wid_and_hgt or -p

Running lspng -nlp - the n will instruct lspng to omit the original filename and name png files numerical. The l instructs lspng to append the image's lightness value and the p will instruct lspng to append the image's width/height dimension, resulting in a filename like: 0_050_320x240.png.
The luminance value in percent ranges from 000 (=white) to 100 (=black).

Build from source

Initially fetch dependencies:git submodule update --init --recursive

Than: cmake CMakeLists.txt; make

Install

Build from source, than: sudo make install

Conventions

The source code of lspng follows the Google C++ Style Guide, see: https://google.github.io/styleguide/cppguide.html

lspng follows the Semantic Versioning Scheme.

Changelog

See CHANGELOG.md

Used third party libraries

Application License
The CImg Library Distributed under the CeCILL-C (close to the GNU LGPL) or CeCILL (compatible with the GNU GPL) licenses.

Author and License

lspng was written by Kay Stenschke and is licensed under the GNU General Public License V3.0

Permissions of this strong copyleft license are conditioned on making available 
complete source code of licensed works and modifications, which include larger 
works using a licensed work, under the same license. Copyright and license 
notices must be preserved. Contributors provide an express grant of patent 
rights.