commit
ba7b0667f0
|
@ -0,0 +1,3 @@
|
||||||
|
bin/GraphicsMagick-1.3.25-Q8/
|
||||||
|
bin/*.exe
|
||||||
|
bin/*.dll
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,42 @@
|
||||||
|
#=-=-=-= DON'T MESS WITH THIS SECTION =-=-=-=
|
||||||
|
# These are locations of where stuff is located on disk.
|
||||||
|
# Normally, you don't need to change this UNLESS you move the
|
||||||
|
# directory outside of C:\
|
||||||
|
MAINPREFIX="/C/imageproc"
|
||||||
|
|
||||||
|
BINLOC="${MAINPREFIX}/bin"
|
||||||
|
RAWLOC="${MAINPREFIX}/raw"
|
||||||
|
RENAMELOC="${MAINPREFIX}/renamed"
|
||||||
|
RESIZELOC="${MAINPREFIX}/resized"
|
||||||
|
|
||||||
|
# Path prefix. Best not to change this
|
||||||
|
# unless you know what your doing.
|
||||||
|
PATH="${BINLOC}:."
|
||||||
|
|
||||||
|
# Program Version
|
||||||
|
PROG_VERSION="1.2-04052017"
|
||||||
|
|
||||||
|
# Version of graphicsmagick to use
|
||||||
|
GM_VERSION="GraphicsMagick-1.3.34-Q8"
|
||||||
|
#=-=-=-= END SECTION =-=-=-=
|
||||||
|
|
||||||
|
# Here is the commonly changed preferences
|
||||||
|
|
||||||
|
# The end resulting image size. Can be specified
|
||||||
|
# as just the long length (1600x) or as the desired
|
||||||
|
# max dimensions (1600x1050).
|
||||||
|
IMG_RESIZE="1600x"
|
||||||
|
|
||||||
|
# Quality setting. Lower number reduces image size
|
||||||
|
# at the expense of quality. 0 is lowest, 100 highest
|
||||||
|
# and 75 is the default.
|
||||||
|
IMG_QUALITY="75"
|
||||||
|
|
||||||
|
# Custom image options, normally this is blank, but we
|
||||||
|
# can specify things like sharpness masks if we want.
|
||||||
|
#IMG_OPTIONS="-unsharp 2x0.5+0.7+0"
|
||||||
|
IMG_OPTIONS="+profile \"*\""
|
||||||
|
|
||||||
|
# Number to start the name at. Commonly
|
||||||
|
# set to "1"
|
||||||
|
STARTNUM="1"
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ./config.txt
|
||||||
|
|
||||||
|
echo -e "eBay Image Processor - Version ${PROG_VERSION}\n\n"
|
||||||
|
echo -n "Please enter current date: "
|
||||||
|
read CURRDATE
|
||||||
|
#CURRDATE="030413"
|
||||||
|
|
||||||
|
echo "Beginning rename..."
|
||||||
|
${BINLOC}/find ${RAWLOC} -iname '*.jpg' |\
|
||||||
|
${BINLOC}/gawk -v resizeloc=${RESIZELOC} -v currdate=${CURRDATE} -v startnum=${STARTNUM} -v binloc=${BINLOC} 'BEGIN{ a=startnum }{ printf "%s/cp -f \"%s\" \"%s/%s_%04d.jpg\"\n", binloc,$0,resizeloc,currdate,a++ }' \
|
||||||
|
| ${BINLOC}/bash
|
||||||
|
|
||||||
|
#echo "Copying..."
|
||||||
|
#${BINLOC}/cp -f ${RENAMELOC}/* ${RESIZELOC}/
|
||||||
|
echo "Resizing..."
|
||||||
|
time ${BINLOC}/${GM_VERSION}/gm mogrify -resize ${IMG_RESIZE} -quality ${IMG_QUALITY} ${IMG_OPTIONS} ${RESIZELOC}/*.jpg
|
||||||
|
|
||||||
|
echo "Done!"
|
||||||
|
echo "Press enter to close."
|
||||||
|
read DUMMYVAR
|
|
@ -0,0 +1,3 @@
|
||||||
|
@ECHO OFF
|
||||||
|
set PATH=C:\imageproc\bin;%PATH%;%CD%
|
||||||
|
bash.exe process-images.sh
|
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
Loading…
Reference in New Issue