Converting DSL/DASL Pictures for INFOhio Library Automation
This process uses two free utilities and a few script files to take a district
directory of pictures in DSL/DASL and automatically convert them into a format
suitable for use with INFOhio Library Automation.
- Create a working directory for some of the items below.
- Select a computer to use for image processing. It will need to be running .NET Framework 2.0 and capable of connecting to the location of the pictures.
- Download and install Multiple Image Resizer.NET from
http://www.multipleimageresizer.net. This program is free for personal and educational use.
- Download the 7-Zip command line version from
and place it in the working directory you created in the first step.
- Create the directories c:\eraseme\pics to temporarily store some picture files. If you wish to use a different directory, do a find/replace for that directory in the INFOhioPics.cmd file and replace it with the directory of your choosing.
- In your working directory create the files listed below. You can create text file using your favorite text editor then paste in the contents for each file.
The files you will need to create are: INFOhioPics.cmd, script.txt, images.txt, and Transferfiles.txt
- Configure the INFOhioPics.cmd file by changing the \\pictureserver\pics$ to the location containing your pictures.
- On the Solaris server hosting Symphony, create a directory and user that will
be used when transferring the files to the server.
Log onto the Solaris server as the "sirsi" user
Acquire "root" privileges with the command "su root"
Create a directory where the images will be transferred
using a command similar to the following: "mkdir /s/sirsi/DASL_Photos"
Create a user that will be used when transferring files
to the server. The example below creates a user called "photos":
# useradd -c "FTP Account for DASL Photos" -d
-g "staff" -s "/bin/bash" photos
Change the owner
and protections of the directory created in step c
to be the newly created user:
chown -R photos:staff /s/sirsi/DASL_Photos
# chmod -R 775 /s/sirsi/DASL_Photos
Use the "exit" command to log off of the Sun
- Configure the Transferfiles.txt file by changing the itc.infohio.org to the INFOhio server where you will
be doing your picture processing. Likewise, change the value username and password to the username/password values for the user account that will be used to place the picture files on that server.
- In your working directory (created in The Setup), create a new text file called RunIt.cmd
- Edit the file RunIt.cmd with a text editor (or right click on the file and pick Edit). Then type in the following two lines:
call INFOhioPics.cmd ZZ
Note: Replace the ZZ with the DSL/DASL district code you wish to process.
- Double-click on RunIt.cmd to process the pictures. You may be prompted for a username/password to connect to your picture directory.
- Repeat the process by editing the file and changing the ZZ to a different district or copy/paste the "INFOhioPics.cmd
ZZ" line and make one line for each district you wish to run.
- Log on to the server hosting the Symphony databases using the "sirsi"
- Review the contents of the directory created in step 8c. Example:
| OTST 1% ls -lh /s/sirsi/DASL_Photos/
- If necessary, rename the zip files to correspond to the
instance codes used in Symphony.
- Run the OHdaslrenamephotofiles.sh script
- Alternatively, you can process the files individually:
- Move the zip file to the corresponding XX/Unicorn/Custom/Photos/
directory (where XX is the instance code assigned to the district):
| OTST 2% mv /s/sirsi/DASL_Photos/ZZ.zip
- Unzip the file
| OTST 3% cd XX/Unicorn/Custom/Photos/
OTST 4% unzip zz.zip
OTST 5% cd
- Proceed to step 4 (running OHrenamephotofiles.sh) of the "Loading
Patron Photos For SirsiDynix Unicorn" section in the
INFOhio Patron Update documentation.
INFOhioPics.cmd (Note:Location of
mirdotnet.exe in step 2 might vary due to version, install location, etc.)
REM Create INFOhio pictures.
REM Created: 9/25/2007 Eric W Schumm
REM Start in the proper location (Replace X: with appropriate drive)
REM Step 0 - Check for district parameter
IF "%1" == "" GOTO NODISTRICT
REM Step 1 - Mapping drives, check/clean up directories
NET USE P: /DELETE
NET USE P: \\pictureserver\pics$\%1
if not exist P:\*.jpg echo no pictures for %1
if not exist P:\*.jpg goto NOPICTURES
if exist c:\eraseme\pics\*.jpg pause
REM Step 2 - Run the Picture conversion program
"\Program Files\Multiple Image Resizer .NET 4.5.2\mirdotnet.exe" /scriptfile="script.txt" /imagelistfile="images.txt"
REM Step 3 - Archive the pictures
7za.exe a -tzip %1 c:\eraseme\pics\*.jpg
REM Step 4 - FTP the pictures to INFOhio server
ftp -i -s:TransferFiles.txt
REM Step 5 - Remove the zip file
REM Finished, go to end of the file
echo. You must provide a district code in order to run this command file ...
echo. %0 DistrictCode
echo. No pictures found or invalid directory for %1. No processing done.
' Resize picture width: 76 pixels, height: 100 pixels
Resize 76, 100
' Crop x,y (0,12) to x,y (76,76)
Crop 0, 12, 76, 76
' Save images as JPEG's at minimum 75% quality to "processed" sub folder under original image
SaveToFolderJpeg "c:\eraseme\pics", 75, False
on April 24, 2013