Sponsored Content
Top Forums Shell Programming and Scripting Find image greater than x pixels? Post 302533125 by mikemeadeuk on Wednesday 22nd of June 2011 06:54:25 PM
Old 06-22-2011
Find image greater than x pixels?

Hi Guys,

I have a little problem, was wondering if anyone had any experience with this?

I am using imagemagick to remove whitespace from images, however some images are corrupt and the server hangs and eventually crashes because imagemagick doesnt know what to do, even though I have set the time out(doesnt seem to work).

Currently I am using command line to find images in a directory and apply imagemagick command to them.

Is there any way I can find images that are greater than 10x10 pixels for example? (All the corrupt images seem to be 0x0 pixels).

I am currently using this command:

Code:
find /directory/ -name "*.jpg" -exec mogrify -trim -fuzz 1% {} \;


Any help would be much much appreciated.

Thanks in advance!

Mike
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find lines greater than 80 characters in a file

Hi, Can anyone please give me the grep command to find all the lines in a file that exceed 80 columns Thanks, gubbala (8 Replies)
Discussion started by: mrgubbala
8 Replies

2. Shell Programming and Scripting

find lines have 2nd colum value greater than 40

i have a file a.txt 12345,20 34567,10 23123,50 123456,45 how to find lines which hav 2nd entry greater than 40 o/p 23123,50 123456,45 pls help to get o/p (5 Replies)
Discussion started by: devesh123
5 Replies

3. Shell Programming and Scripting

Important finding --- find files greater than 1 MB

as we can find file greater than 1 MB with find command as: find /dir -name '*' -size +1M find /dir/* -name '*' -size +1M but wats its doing is , its finding files only in current directory not in sub-directories. i want files from sub-directories too. Please help... Thanx in... (3 Replies)
Discussion started by: manoj_dahiya22
3 Replies

4. Shell Programming and Scripting

find port greater than 6000

How to get the listening ports which is greater than 6000 using netstat ? (1 Reply)
Discussion started by: gsiva
1 Replies

5. Shell Programming and Scripting

Trying to find files equal to and greater than

Hi Guys and Gals, I'm having some difficulty putting this check into a shell script. I would like to search a particular directory for a number of files. The logic I have is pretty simple: Find file named *.txt that are newer than <this file> and count them If the number of files is equal to... (4 Replies)
Discussion started by: bbbngowc
4 Replies

6. Shell Programming and Scripting

find greater than value

Hi I want to find greater than and min value. dategrep() { varlinenum=$1 varSESSTRANS_CL="$(egrep -n "<\/SESSTRANSFORMATIONINST>" tmpsess9580.txt | cut -d":" -f1)" echo $varSESSTRANS_CL } dategrep 8 Output of the above command is: I want to find out greater than 8 and... (9 Replies)
Discussion started by: tmalik79
9 Replies

7. Shell Programming and Scripting

Find files greater than a particular date in filename.

I need a unix command which will find all the files greater that a particular date in the file name. say for example I have files like(filenaming cov : filename.YYDDMMSSSS.txt) abc.201206015423.txt abc.201207013456.txt abc.201202011234.txt abc.201201024321.txt efg.201202011234.txt... (11 Replies)
Discussion started by: lijjumathew
11 Replies

8. Shell Programming and Scripting

Help me to find a greater than or smaller than values

Hi, i need to find one of the value from my file is in between two numbers, that is the value is greater than 34 and smaller than 50, Ex: File.txt col1 col2 col3 col4 1 Name1 93 w 2 Name2 94 a 3 Name3 32 b 4 Name4 45 x 5 Name5 50 y 6 Name6 49 z here i need to find col3 values are... (7 Replies)
Discussion started by: Shenbaga.d
7 Replies

9. Shell Programming and Scripting

Find and substitute if greater than.

I have large config-files for an application. The lines have different structure, but some of them contains the parameter 'TIMEOUT=x', where x is an numeric value. I want to change the value for that specific paramater if the value is greater than a specific value (got that?). The timeout-parameter... (3 Replies)
Discussion started by: useless
3 Replies

10. UNIX for Beginners Questions & Answers

Find command size greater than or equalto

How do I find the files greater than or equal to a given size using find command. find ./ -size +0k --> Lists files greater than 0K find ./ -size 0k --> Lists the file size equal to 0K. I have other conditions to check, hence using find command. Thanks in advance. (4 Replies)
Discussion started by: deepakwins
4 Replies
ImageMagick(1)						      General Commands Manual						    ImageMagick(1)

NAME
ImageMagick - is a free software suite for the creation, modification and display of bitmap images. SYNOPSIS
convert input-file [options] output-file OVERVIEW
ImageMagick(R), is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of for- mats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and B['e]zier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically. ImageMagick includes a number of command-line utilities for manipulating images. Most of you are probably accustom to editing images one at a time with a graphical user interface (GUI) with such programs as gimp or Photoshop. However, a GUI is not always convenient. Suppose you want to process an image dynamically from a web script or you want to apply the same operations to many images or repeat a specific opera- tion at different times to the same or different image. For these types of operations, the command-line image processing utility is appro- priate. In the paragraphs below, find a short description for each command-line tool.Cl ick on the program name to get details on the program usage and a list of comman d-line options that alters how the program performs. If you are just getting acq uainted with ImageMagick, start at the top of the list, the convert program, and work your way down. Also be sure to peruse Anthony Thyssen's tutorial on how to use ImageMagick utilities to convert, compose, or edit images from the command- line. convert convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. identify describes the format and characteristics of one or more image files. mogrify resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert writes to a different image file. composite overlaps one image over another. montage create a composite image by combining several separate images. The images are tiled on the composite image optionally adorned with a border, frame, image name, and more. compare mathematically and visually annotate the difference between an image and its reconstruction.. stream is a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats. It writes the pixel components as they are read from the input image a row at a time making stream desirable when working with large images or when you require raw pixel components. display displays an image or image sequence on any X server. animate animates an image sequence on any X server. import saves any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen. conjure interprets and executes scripts written in the Magick Scripting Language (MSL). For more information about the ImageMagick, point your browser to file:///usr/share/doc/imagemagick/index.html or http://www.imagemag- ick.org/. SEE ALSO
convert(1), identify(1), composite(1), montage(1), compare(1), display(1), animate(1), import(1), conjure(1), quantize(5), miff(4) COPYRIGHT
Copyright (C) 1999-2012 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file:///usr/share/doc/imagemagick/www/license.html or http://www.imagemagick.org/script/license.php ImageMagick Date: 2009/01/10 01:00:00 ImageMagick(1)
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy