Sponsored Content
Top Forums Shell Programming and Scripting Simple script for resize, crop and optimize jpg Post 303025771 by Neo on Monday 12th of November 2018 05:54:54 AM
Old 11-12-2018
Quote:
Originally Posted by bakunin
.

.....

Some finishing touches you should implement, though: an instructive help message (see the program code for pointers where to put it), some more checks if files are really in JPG format (the extension actually says nothing, i could rename any file to "file.jpg") for which i recommend the file utility.

I hope this helps.

bakunin
Wow. What a great reply and implementation tutorial.

Thank you for the inspiring post!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

optimize the script

Hi, I have this following script below. Its searching a log file for 2 string and if found then write the strings to success.txt and If not found write strings to failed.txt . if one found and not other...then write found to success.txt and not found to failed.txt. I want to optimize this... (3 Replies)
Discussion started by: amitrajvarma
3 Replies

2. UNIX for Dummies Questions & Answers

Can we optimize this simple script ?

Hi All , I am just a new bie in Unix/Linux . With help of tips from 'here and there' , I just created a simple script to 1. declare one array and some global variables 2. read the schema names from user (user input) and want2proceed flag 3. if user want to proceed , keep reading user... (8 Replies)
Discussion started by: rajavu
8 Replies

3. UNIX for Dummies Questions & Answers

optimize shell script (snapshots)

I've a script to do some snapshots but the time it does so is very different... once i got a snapshot under 1 sec, on the other hand it took 3 sec, but nothing else changed, i didnt even move the cursor or something. I put the script on a ramdisk and its faster, but still swing from under 1... (1 Reply)
Discussion started by: mcW
1 Replies

4. Shell Programming and Scripting

Simple BASH shell script to rename webcam jpg and copy into a new directory.

System: Ubuntu Intrepid Ibex I'm running webcamd as a sort of "security" program, but I need a script that will archive my webcam.jpg files. So, take the following file: /home/slag/www/webcam.jpg Rename it--preferably with a time stamp. Place it in say: /home/slag/www/history/ ... (4 Replies)
Discussion started by: robfindlay
4 Replies

5. Shell Programming and Scripting

find jpg's mkdir script help

I am having a problem getting this to work right. The script needs to search through directories and subdirectories. If a jpg is found then create a folder in that directory, so on and so forth. Here is what I have so far but it doesn't work right. Help please #!/bin/bash for d in `find ./... (1 Reply)
Discussion started by: jedhypes
1 Replies

6. Shell Programming and Scripting

Optimize and Speedup the script

Hi All, There is a script (test.sh) which is taking more CPU usage. I am attaching the script in this thread. Could anybody please help me out to optimize the script in a better way. Thanks, Gobinath (6 Replies)
Discussion started by: ntgobinath
6 Replies

7. Emergency UNIX and Linux Support

Help to optimize script running time

Dear Forum experts I have the below script which I made to run under bash shell, it runs perfectly for low records number, let us say like 100000. when I put all records (3,000,000), it's takes hours can you please suggest anything to optimize or to run in different way :-| {OFS="|";... (6 Replies)
Discussion started by: yahyaaa
6 Replies

8. UNIX for Dummies Questions & Answers

optimize if block : shell script

Hi, I need a shell script to determine if a no. is either even, greater than 4, less than 8 SHELL : ksh OS : RHEL 6 this is the if block of the script mod=`expr $num % 2` if || || then echo "No. is either even or greater than 4 or less than 8" fi this code works... (2 Replies)
Discussion started by: sam05121988
2 Replies

9. Shell Programming and Scripting

Optimize my mv script

Hello, I'm wondering if there is a quicker way of doing this. Here is my mv script. d=/conversion/program/out cd $d ls $d > /home/tempuser/$$tmp while read line ; do a=`echo $line|cut -c1-5|sed "s/_//g"` b=`echo $line|cut -c16-21` if ;then mkdir... (13 Replies)
Discussion started by: whegra
13 Replies

10. Shell Programming and Scripting

Help Optimize the Script Further

Hi All, I have written a new script to check for DB space and size of dump log file before it can be imported into a Oracle DB. I'm relatively new to shell scripting. Please help me optimize this script further. (0 Replies)
Discussion started by: narayanv
0 Replies
IPROCESS(1)                                                   General Commands Manual                                                  IPROCESS(1)

NAME
iprocess - simple image processing operations SYNOPSIS
iprocess [options] inputfiles... -o outputfile DESCRIPTION
iprocess is a program for simple image processing operations. OPTIONS
--help Print help message -o %s Set output filename Image operations: --add Add two images --crop %d %d %d %d Crop an image (xmin, xmax, ymin, ymax) --flip Flip the Image (upside-down) --flop Flop the Image (left/right mirror) Output options: --filter %s %f Set the filter to use for resize --resize %d %d Resize the image to x by y pixels SEE ALSO
iconvert(1), idiff(1), igrep(1), iinfo(1), iv(1), maketx(1), oiiotool(1). AUTHOR
OpenImageIO was written by Larry Gritz and the other authors and contributors. This manual page was written by IRIE Shinsuke <irieshinsuke@yahoo.co.jp>, for the Debian project (and may be used by others). May 19, 2012 IPROCESS(1)
All times are GMT -4. The time now is 05:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy