LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-21-2005, 01:46 PM   #1
LinuxLala
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

Code:
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.

Thanks.
 
  


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

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

All times are GMT -5. The time now is 03:33 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