How do I use -seed with +noise Random
- fmw42
- Posts: 24568
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
How do I use -seed with +noise Random
How do I specify a new seed when generating a random noise image? For example:
convert -size 100x100 xc: -seed +noise Random tmp.png
returns error:
convert: invalid argument for option `+noise': -seed @ convert.c/ConvertImageCommand/2194.
Is this a bug or am I not using it correctly?
IM 6.4.7-10 Q16 Mac OSX Tiger
convert -size 100x100 xc: -seed +noise Random tmp.png
returns error:
convert: invalid argument for option `+noise': -seed @ convert.c/ConvertImageCommand/2194.
Is this a bug or am I not using it correctly?
IM 6.4.7-10 Q16 Mac OSX Tiger
Re: How do I use -seed with +noise Random
Try this command:How do I specify a new seed when generating a random noise image? For example:
- convert -size 100x100 xc: -seed 171713 +noise Random tmp.png
- fmw42
- Posts: 24568
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do I use -seed with +noise Random
magick wrote:Try this command:How do I specify a new seed when generating a random noise image? For example:
- convert -size 100x100 xc: -seed 171713 +noise Random tmp.png
OK, perhaps I misunderstand. If I leave off the -seed, and create two random images with two separate command lines, will the two images be the same random pattern or differerent? Are you changing the seed on each command line in some way and if so using what key for the seed?
convert -size 100x100 xc: +noise Random tmp1.png
convert -size 100x100 xc: +noise Random tmp2.png
My tests seem to show different patterns. So perhaps I don't need to use -seed.
Re: How do I use -seed with +noise Random
The random images will always differ if a seed is not specified or if two commands have different seeds (i.e. -seed 17171 and -seed 17172). If the seeds are the same, the resulting images will be the same.
- fmw42
- Posts: 24568
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do I use -seed with +noise Random
magick wrote:The random images will always differ if a seed is not specified or if two commands have different seeds (i.e. -seed 17171 and -seed 17172). If the seeds are the same, the resulting images will be the same.
If one does not set the seed and leaves it to IM to do for example with
convert -size 100x100 xc: +noise Random tmp.png
is there some way to get IM to report the seed value to the terminal, so that the same value can be used again with -seed to reproduce the same pattern?
I tried adding -verbose, but that did not report the seed value.
Re: How do I use -seed with +noise Random
There is no way to determine the seed value unless you set it yourself.
- fmw42
- Posts: 24568
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How do I use -seed with +noise Random
OK. Then any restrictions on the value that can be used for the seed? for example, must it be an integer between 0 and quantumrange?magick wrote:There is no way to determine the seed value unless you set it yourself.
Re: How do I use -seed with +noise Random
The seed can be any 32-bit value.