LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-07-2006, 08:23 AM   #1
muddywaters
Member
 
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427

Rep: Reputation: 30
batch resize in digikam


I'm trying to use batch resize on all the photos in an album to send to family members. Resizing individual photos with digikam is no problem.

When trying to use the batch resize everything came out black. Changing the background color to white resulted in a bunch of white boxes. No background doesn't seem to be an option.Batch resize goes through the motions but produces no useable output. The resize window offers a bunch of filter options, but they might as well be written in greek for all I understand of it.

Any idea what I may be doing wrong? Is this part of digikam just buggy?
 
Old 06-07-2006, 02:14 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
You could do it from the command line, using ImageMagick's convert command. You might have to build a little script around it to resize all files in a batch operation.

The script below works, but is pretty stupid.

Code:
#!/bin/sh
# calls the "convert" program from "ImageMagick" suite and
# resizes all pictures in a given directory which comply
# to the file mask given.
#

DEBUG=""

if [ -z "$1" ]
then
  echo -e "Usage: resize_image <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{<}{>} quality file1 file2...\n"
  echo "The size and quality specification are equal to the -geometry specification"
  echo "in the \"convert\" command in the ImageMagick suite."
  echo "No spaces are allowed in the geometry specification."
  exit 1
fi

new_geo=$1
new_quality=$2
echo "1: $new_geo"
echo "2: $new_quality"
shift 2

number=0

for file in $*
do
echo $file
if [ -f $file ]
then
  let "number += 1"
  echo "processing file $number: $file"
  r_file=r_$file
  $DEBUG convert -geometry $new_geo -quality $new_quality $file $r_file
fi
done

echo "processed $number files"
jlinkels
 
Old 06-07-2006, 10:20 PM   #3
muddywaters
Member
 
Registered: May 2005
Location: Winnipeg, Canada
Distribution: mostly mepis
Posts: 427

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jlinkels
The script below works, but is pretty stupid.
No need to apologize for that script, it works a treat.
Thanks jlinkels.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Digikam help please marcia Linux - Software 1 03-08-2006 08:27 AM
How to get digikam to work? JockVSJock Slackware 15 02-14-2006 08:32 PM
Digikam won't download raysr Mandriva 3 08-07-2005 02:11 PM
Digikam in 9.3 LinuxPimp SUSE / openSUSE 1 05-14-2005 09:54 PM
batch image resize and compression Darkfalz Linux - Software 3 08-01-2004 02:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration