diff options
author | B. Watson <urchlay@slackware.uk> | 2024-10-07 22:38:06 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-10-12 11:34:43 +0700 |
commit | 14d4883ce882e4c452dcd549ccccdc81a87f26bd (patch) | |
tree | 4ef720c8cfc8781c61ec242516f6052327de2fa2 /graphics | |
parent | d1b4fc9176e28798954d51ef26930bd4a55e8da8 (diff) |
graphics/aaphoto: New maintainer, add man page.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/aaphoto/README | 20 | ||||
-rw-r--r-- | graphics/aaphoto/aaphoto.1 | 174 | ||||
-rw-r--r-- | graphics/aaphoto/aaphoto.SlackBuild | 73 | ||||
-rw-r--r-- | graphics/aaphoto/aaphoto.info | 4 | ||||
-rw-r--r-- | graphics/aaphoto/err_unsupport_format.diff | 27 | ||||
-rw-r--r-- | graphics/aaphoto/slack-desc | 10 |
6 files changed, 257 insertions, 51 deletions
diff --git a/graphics/aaphoto/README b/graphics/aaphoto/README index ef3743f4c3de..ec9872462d01 100644 --- a/graphics/aaphoto/README +++ b/graphics/aaphoto/README @@ -1,13 +1,15 @@ +aaphoto (automatic color correction of photo) + Auto Adjust Photo is a tiny command-line image manipulation tool for -automatic color correction of photos. It tries to make the picture look -better. The program analyzes the histogram of the image and tries to set -the most optimal black and white point of the image. Removes the veiled -effect caused by the shifted colors, adjusts the color balance and -saturation, and corrects the gamma factor. +automatic color correction of photos. It tries to make the picture +look better. The program analyzes the histogram of the image and tries +to set the most optimal black and white point of the image. It removes +the veiled effect caused by the shifted colors, adjusts the color +balance and saturation, and corrects the gamma factor. -This can be a solution for those kind of users who are not able to -manage and correct images with complicated graphical softwares, or just -simply don't intend to spend a lot of time with manually correcting the -images one-by-one. +This can be a solution for users who are not able to manage and +correct images with complicated graphical software, or just simply +don't intend to spend a lot of time manually correcting the images +one-by-one. The program handles the following image formats: bmp, jpg, png. diff --git a/graphics/aaphoto/aaphoto.1 b/graphics/aaphoto/aaphoto.1 new file mode 100644 index 000000000000..f6763f4d2dff --- /dev/null +++ b/graphics/aaphoto/aaphoto.1 @@ -0,0 +1,174 @@ +.\" Man page for aaphoto + +.TH AAPHOTO "1" "October 7 2024" "aaphoto-0.45" "SlackBuilds.org" + +.SH NAME +aaphoto - automatic color correction of photos + +.SH SYNOPSIS +aaphoto [option[s]] [source file[s]] + +.SH DESCRIPTION +Auto Adjust Photo is a tiny command-line image manipulation tool +for automatic color correction of photos. It tries to make the picture +look better. The program does this by analyzing the input image and then +sets the most optimal contrast, gamma, color balance and saturation for it. +.br + +The following image types are supported: +.br +bmp, jpg, png +.br +.PP +Quality settings can be applied only to jpg format images. +.br + +.SH OPTIONS +The following options are supported: +.TP +\fB\-h\fR \fB\-\-help\fR +Print this help +.TP +\fB\-v\fR \fB\-\-version\fR +Print version information +.TP +\fB\-a\fR \fB\-\-autoadjust\fR +Auto adjust the colors of the image +.TP +\fB\-o\fR \fB\-\-output\fR +Set output directory +.TP + \fB\-\-overwrite\fR +Overwrite mode, the original source file is replaced +.TP + \fB\-\-jpg\fR +JPG image output +.TP + \fB\-\-png\fR +PNG image output with alpha channel support +.TP + \fB\-\-bmp\fR +BMP image output +.TP +\fB\-r\fR \fB\-\-resize\fR +Resize image taking the longer side in % or pixels +.TP + \fB\-\-rotate90\fR +Rotate image with 90 degrees clockwise +.TP + \fB\-\-rotate180\fR +Rotate image with 180 degrees +.TP + \fB\-\-rotate270\fR +Rotate image with 90 degrees counter\-clockwise +.TP + \fB\-\-flipx\fR +Mirror image horizontally +.TP + \fB\-\-flipy\fR +Mirror image vertically +.TP + \fB\-\-noexif\fR +Save image without EXIF info +.TP +\fB\-q\fR \fB\-\-quality\fR +Set image quality from 1 to 100 +.TP +\fB\-t\fR \fB\-\-threads\fR +Set number of working threads (default: autodetect) +.TP +\fB\-s\fR \fB\-\-silent\fR +Silent mode, no information printed during operation +.TP + \fB\-\-quiet\fR +Same as \-s, \-\-silent +.TP +\fB\-V\fR \fB\-\-verbose\fR +Print verbose information about processing +.TP + \fB\-\-test\fR +Print detailed test information into image + +.SH EXAMPLES +aaphoto folders +.br +aaphoto image.jpg +.br +aaphoto \fB\-a \-r600 \-q85\fR *.jpg +.br +aaphoto mydir +.br +aaphoto \fB\-V \-\-resize70%\fR image.png +.br +aaphoto \fB\-\-quality60\fR image.jpg +.br +aaphoto image.jpg + +.SH EXIT STATUS +.br +\fB0\fR (success) if at least one file was processed, or \fB1\fR (error) if no files were processed (either due to an error in the arguments, or because none of the files exist, or because none of them are in supported formats). + +.SH REMARKS +.br +\- file format is determined by the filename extension. Supported extensions: +\fB.bmp\fR, \fB.jpg\fR, \fB.jpeg\fR, \fB.jpe\fR, \fB.png\fR. +.br +\- filename extensions are case\-insensitive (\fB.jpg\fR and \fB.JPG\fR are treated +the same way). +.br +\- if a file is misnamed (has no extension, or has the wrong one), +it won't be processed. Example: if a PNG file gets renamed to +\fBfoo.jpg\fR, it will fail. +.br +\- auto adjust parameter is set by default without any other parameters +.br +\- a _new filename will be generated without \fB\-\-overwrite\fR parameter +.br +\- every file is processed on directory input but not recursively +.br +\- order of parameters does not matter +.br +\- resize value can be set in percentage too +.br +\- resize parameter should be less or equal than original +.br +\- resize uses the best (and slowest) resampling method +.br +\- default jpeg compression quality is 95% +.br +\- EXIF information is restored in jpeg images by default +.br +\- number of threads is set to the number of online processors by default + +.SH AUTHORS +.br +Auto Adjust Photo +.br +Copyright (C) 2006\-2011 Andras Horvath +.br +E\-mail: mail@log69.com \- suggestions & feedbacks are welcome +.br +URL: http://log69.com \- the official site +.br +Man page originally made by rezso (rezso@rezso.net), and modified for +SlackBuilds.org by B. Watson (urchlay@slackware.uk). +.PP +The following libraries are used by this program: +.br +libgomp - OpenMP for parallel programming, http://gcc.gnu.org/onlinedocs/libgomp/ +.br +libjpeg - IJG JPEG software, http://www.ijg.org/ +.br +libpng - PNG software, http://www.libpng.org/ +.br +libz - Compression library, http://www.zlib.net/ + +.SH LICENSE +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. +.br +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +.br +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. + +.SH "SEE ALSO" +The full documentation for \fBaaphoto\fR is available on the website: \fBhttp://log69.com\fR diff --git a/graphics/aaphoto/aaphoto.SlackBuild b/graphics/aaphoto/aaphoto.SlackBuild index dfba6d20c9b3..c7e27bf1a205 100644 --- a/graphics/aaphoto/aaphoto.SlackBuild +++ b/graphics/aaphoto/aaphoto.SlackBuild @@ -2,32 +2,23 @@ # Slackware build script for aaphoto -# Copyright 2020-2023, Alexander Verbovetsky, Moscow, Russia -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Original author: Alexander Verbovetsky, Moscow, Russia +# Now maintained by B. Watson <urchlay@slackware.uk>. +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20241007 bkw: BUILD=2 +# - take over maintenance. +# - make COMMIT overrideable in env (probably not worth doing). +# - add man page. +# - patch the code so it prints error messages for unsupported files. +# - grammar fixes for README and slack-desc. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=aaphoto VERSION=${VERSION:-0.45} -COMMIT="ad4fc3c04b9e25212d78c231e1507458dfea8909" # this is ver. 0.45 -BUILD=${BUILD:-1} +COMMIT="${COMMIT:-ad4fc3c04b9e25212d78c231e1507458dfea8909}" # this is ver. 0.45 +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -67,11 +58,15 @@ rm -rf $PRGNAM-$COMMIT tar xvf $CWD/${PRGNAM}-${COMMIT}.tar.gz cd $PRGNAM-$COMMIT chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20241007 bkw: patch makes it print an "image can't be loaded" +# message for unsupported files (instead of just "done"). Avoids +# confusing the user. It also makes aaphoto exit with error status if +# all of the input files were unsupported (success = at least one file +# was processed). +patch -p1 < $CWD/err_unsupport_format.diff CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -80,15 +75,23 @@ CXXFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYRIGHT ChangeLog NEWS README REMARKS TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +make install-strip DESTDIR=$PKG + +# 20241007 bkw: man page came from Debian, but has been modified to +# remove all references to .jp2 and jasper. This is because upstream +# dropped jp2/jasper support, but forgot to update the man page. I +# thought about re-adding jp2/jasper support, but it's a good bit of +# work... and as upstream points out, nobody uses it anyway. I also +# added some remarks about filename extensions, since aaphoto relies +# entirely on the extension to determine file type; also documented +# the exit status (due to the patch, above). +mkdir -p $PKG/usr/man/man1 +gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS COPYRIGHT ChangeLog NEWS README REMARKS TODO $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/graphics/aaphoto/aaphoto.info b/graphics/aaphoto/aaphoto.info index 615764b7e0b4..7b86be36db55 100644 --- a/graphics/aaphoto/aaphoto.info +++ b/graphics/aaphoto/aaphoto.info @@ -6,5 +6,5 @@ MD5SUM="6296b7f842df7f9feb11cefe64dfc068" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Alexander Verbovetsky" -EMAIL="alik@ejik.org" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/graphics/aaphoto/err_unsupport_format.diff b/graphics/aaphoto/err_unsupport_format.diff new file mode 100644 index 000000000000..8614b29c8aed --- /dev/null +++ b/graphics/aaphoto/err_unsupport_format.diff @@ -0,0 +1,27 @@ +diff -Naur aaphoto-ad4fc3c04b9e25212d78c231e1507458dfea8909/aaio.c aaphoto-ad4fc3c04b9e25212d78c231e1507458dfea8909.patched/aaio.c +--- aaphoto-ad4fc3c04b9e25212d78c231e1507458dfea8909/aaio.c 2016-07-10 06:55:14.000000000 -0400 ++++ aaphoto-ad4fc3c04b9e25212d78c231e1507458dfea8909.patched/aaio.c 2024-10-07 22:12:48.451095842 -0400 +@@ -1886,6 +1886,7 @@ + /* if it's a BMP format, then load BMP with custom procedure */ + if (GET_FILE_FORMAT(file_name) == 0){ + if (BITMAP_READ_BMP(file_name)) return 1; ++ return 0; + } + else{ + +@@ -1908,13 +1909,13 @@ + return 0; + } + +- return 0; ++ return 1; + + + #endif + } + +- return 0; ++ return 1; + } + + diff --git a/graphics/aaphoto/slack-desc b/graphics/aaphoto/slack-desc index bd41423d920b..8713629d6e02 100644 --- a/graphics/aaphoto/slack-desc +++ b/graphics/aaphoto/slack-desc @@ -8,11 +8,11 @@ |-----handy-ruler------------------------------------------------------| aaphoto: aaphoto (automatic color correction of photo) aaphoto: -aaphoto: Auto Adjust Photo is a tiny command-line image manipulation tool for -aaphoto: automatic color correction of photos. It tries to make the picture -aaphoto: look better. The program does this by analyzing the input image and -aaphoto: then sets the most optimal contrast, gamma, color balance and -aaphoto: saturation for it. +aaphoto: Auto Adjust Photo is a tiny command-line image manipulation +aaphoto: tool for automatic color correction of photos. It tries to +aaphoto: make the picture look better, by analyzing the input image +aaphoto: and setting the most optimal contrast, gamma, color balance +aaphoto: and saturation for it. aaphoto: aaphoto: Homepage: https://github.com/log69/aaphoto aaphoto: |