Showing posts with label patron images. Show all posts
Showing posts with label patron images. Show all posts

Resize patron images to upload

Resize  patron images before upload into Koha. Big size patron images can make Koha database size big. You can resize images using imagemagick commands with Ubuntu or Debian.

Install Image Magick

sudo apt-get install imagemagick

Copy all patron images into a folder. Enter inside the folder from command Terminal, Example:

cd /home/koha/Pictures 

mogrify -resize 50% -format jpg *


Change percentage based on the original file size.

Resize image by specifies width and height,

mogrify -resize 800x600 -format jpg *

Specify width only, it automatically calculate height,

mogrify -resize 800x -format jpg *

Information courtesy: Shaiful Azam's Weblog

A useful script to compress patron images to upload

Here is a python script, which is very helpful to compress bulk patron images without any hassle.
Details of bulk patron image option is available in Koha documentation.
http://manual.koha-community.org/3.12/en/tools.html#uploadpatronimages

In academic libraries, every year hundreds of photos arrive from office to library to upload in Koha.
Using this script, you can compress images in batch mode and create id link for entire images.

This script created by Mr. A.J. Tomson, Librarian, Devagiri College, Kozhikode.
He had implemented Koha in 2000 itself. He is an active resource person of Koha in Kerala state.
Recently he completed 100 Koha training programmes as resource person.

How to use the script?


1. Arrange your photos in a folder. Ensure that photo name must be card number of patrons.
2. Goto the following link and click on Download button.
https://docs.google.com/file/d/0B6E3iEzJp74uWWI4V3BwdUppdk0/edit?usp=sharing

3. Put idlink.py script in photo folder.

4. Open a terminal and enter inside photo folder and apply following commands,

chmod +x idlink.py
./idlink.py

5. After the process, you can see zip file, where all your photos compressed.

Goto Koha > Tools > Upload Patron Images

Upload the zip file.

I once again express my thanks to Mr. A.J. Tomson on behalf of  Koha community.