Re: How to have monocrome "Dark Blue" rather than "Black" for the following operation?
Bob Friesenhahn <[email protected]> Tue, 4 Jul 2023 19:24:53 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 4 Jul 2023, Susmita/Rajib wrote: > > Thank you very much indeed. > > I am sorry. Perhaps knoppix only has imagemagick installed, not > graphicsmagick. So I had to remove the string "gm" from your given > command line. :-( Most distributions also offer GraphicsMagick (see https://repology.org/project/graphicsmagick/versions), but Knoppix is a is a bootable Live system on CD, DVD or USB flash drive (is not a "distribution"), so it seems unable to provide any package options. From http://ftp.uni-kl.de/pub/linux/knoppix-dvd/dpkg-l-dvd-861.txt, I see that knoppix does have GraphicsMagick in it but it seems they somehow forgot to include the tiny 'gm' utility. > Like you used the keyword blue, how could the colour, Dark Blue, > identified by the following value, as mentioned earlier too: > The identifier for Dark Blue: > PMS: 3591 C > Hex Color: #06038D; > RGB: (3,37,126) > CMYK: (100,87,0,25) > be used instead? You could use -fill '#06038D' instead of -fill blue The RGB syntax indicated by Cristy should work with GraphicsMagick as well. GraphicsMagick has a standard definition for 'DarkBlue' but it seems slightly different than your definition. > In the coming days, I would be able to learn about the options. What I > wouldn't learn is why you used the code-line the way you did. It is due to learning how things work. There are often multiple ways to solve the same problem. There are definitely multiple ways to accomplish this particular task. Looking at the utility 'help' output and reading the documentation is a good start. It does not look like Cristy's solution would produce the same result. > Did you acquire this specialised knowhow learnt by experience? Or was > it because of your position of privilege as a specialised programmer? It is partially due to 30 years of experience with ImageMagick + GraphicsMagick (since 1992). Not because of any privilege since the information has always been available to all. > So could you please share the insights and the reasons for your > writing the code-line the way you did please? Did you write this code > consciously, or did the code just came to you? It is based on imagining an order of operations (left to right) which would achieve your desired result. > > Particularly, you have used two -colorspace options. then colorize and > adjoin. Why? The reason behind your using such options? The '-colorspace gray' assures that the image is in grayscale. Then the '-colorspace rgb' implies that the image will be treated as if it has red, green, and blue channels. The GIF format supports multiple frames in one file. The 'adjoin' option controls if multiple frames should be output to one file, or to multiple files. The +adjoin option disables appending the output to one file and assures that the output is put into multiple files as you said you wanted. The use of '+' is extremely old syntax that ImageMagick borrowed from even older software. For example, in the Unix Bourne shell, '-' turns an option on, and '+' turns an option off. It sounds strange but it is what a programmer (Stephen Bourne) decided to use sometime between 1976 and 1979. And then some popular software called X11 decided to use it as well. There is a long history which inspired/directed the development of ImageMagick, but GraphicsMagick split from ImageMagick some 20 years ago already! Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt