Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-21-2005, 02:46 PM   #1
Senior Member
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
ImageMagick: the rand() function and using brackets in commands

Hi all,

I was wondering if somebody could explain or point me to some resource describing what exactly does the rand() function do in imagemagick.

The other question is this: I see that at times brackets are used in complex commands in imagemagick. For example

convert \( light.png \( +clone -fx 'rand()' -threshold -1 \) \
> +swap +matte -compose CopyOpacity -composite \) \
> \( dark.png \( +clone -threshold 100% \) \
> +swap +matte -compose CopyOpacity -composite \) \
> -compose Over -composite high_lighting.png
It would be great if someone could explain the use of brackets and the rand(). From what I remember, the brackets are used to take the image operations into a scrap book (like we do with math calculations) and then the final result is brought back into the command. Is this even close to what the brackets are for?

Please help.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Bash Commands List by Function? TBennettcc Linux - Newbie 6 01-06-2006 03:08 AM
Kmail--Unbalanced Brackets mooreted Linux - Software 4 01-14-2005 08:41 PM
rand() question deiussum Programming 6 11-11-2004 03:10 PM
How to read manual pages ??[the meaning of different symbols like brackets etc] GingoTree Linux - Software 1 07-10-2004 03:46 AM
Need help using rand() in C KneeLess Programming 12 10-01-2003 01:51 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 AM.

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