ImageMagick: How to thicken lines












2















I'm trying to thicken lines with imagemagick. There is a description about how to do this here, but when I do it on my sample images they just stay the same or get rather weaker.



Examples given from imagemagick (that do not make lines thicker when I try):



convert man.gif -morphology Thicken '3x1+2+0:1,0,0' thick_right.gif
convert man_line.gif -morphology Thicken ConvexHull thick_line.gif


My Sample image




  • Does anyone know how to make the lines (or shapes) thicker/bolder?

  • also: how does the "command" '3x1+2+0:1,0,0' work?










share|improve this question



























    2















    I'm trying to thicken lines with imagemagick. There is a description about how to do this here, but when I do it on my sample images they just stay the same or get rather weaker.



    Examples given from imagemagick (that do not make lines thicker when I try):



    convert man.gif -morphology Thicken '3x1+2+0:1,0,0' thick_right.gif
    convert man_line.gif -morphology Thicken ConvexHull thick_line.gif


    My Sample image




    • Does anyone know how to make the lines (or shapes) thicker/bolder?

    • also: how does the "command" '3x1+2+0:1,0,0' work?










    share|improve this question

























      2












      2








      2


      1






      I'm trying to thicken lines with imagemagick. There is a description about how to do this here, but when I do it on my sample images they just stay the same or get rather weaker.



      Examples given from imagemagick (that do not make lines thicker when I try):



      convert man.gif -morphology Thicken '3x1+2+0:1,0,0' thick_right.gif
      convert man_line.gif -morphology Thicken ConvexHull thick_line.gif


      My Sample image




      • Does anyone know how to make the lines (or shapes) thicker/bolder?

      • also: how does the "command" '3x1+2+0:1,0,0' work?










      share|improve this question














      I'm trying to thicken lines with imagemagick. There is a description about how to do this here, but when I do it on my sample images they just stay the same or get rather weaker.



      Examples given from imagemagick (that do not make lines thicker when I try):



      convert man.gif -morphology Thicken '3x1+2+0:1,0,0' thick_right.gif
      convert man_line.gif -morphology Thicken ConvexHull thick_line.gif


      My Sample image




      • Does anyone know how to make the lines (or shapes) thicker/bolder?

      • also: how does the "command" '3x1+2+0:1,0,0' work?







      imagemagick image-manipulation






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 30 '16 at 4:33









      tokoshtokosh

      1315




      1315






















          1 Answer
          1






          active

          oldest

          votes


















          2














          It seems these "morphology"s are were made having a black background as a basis. Once the image is white-on-black, the transformation works. From the documentation:




          It was original developed with binary (pure black and white) images in
          mind




          Negate the colors (so that I have white on black):



          convert black-on-white.png -negate white-on-black.png


          Then do above transformation from the question. However, I had better results with following morphology:



          convert white-on-black.png -morphology Dilate Octagon fat-white-on-black.png


          Still, nice to have would be to have it work from different color schemes.






          share|improve this answer



















          • 2





            The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon .

            – meuh
            Jul 30 '16 at 8:59











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f299218%2fimagemagick-how-to-thicken-lines%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          It seems these "morphology"s are were made having a black background as a basis. Once the image is white-on-black, the transformation works. From the documentation:




          It was original developed with binary (pure black and white) images in
          mind




          Negate the colors (so that I have white on black):



          convert black-on-white.png -negate white-on-black.png


          Then do above transformation from the question. However, I had better results with following morphology:



          convert white-on-black.png -morphology Dilate Octagon fat-white-on-black.png


          Still, nice to have would be to have it work from different color schemes.






          share|improve this answer



















          • 2





            The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon .

            – meuh
            Jul 30 '16 at 8:59
















          2














          It seems these "morphology"s are were made having a black background as a basis. Once the image is white-on-black, the transformation works. From the documentation:




          It was original developed with binary (pure black and white) images in
          mind




          Negate the colors (so that I have white on black):



          convert black-on-white.png -negate white-on-black.png


          Then do above transformation from the question. However, I had better results with following morphology:



          convert white-on-black.png -morphology Dilate Octagon fat-white-on-black.png


          Still, nice to have would be to have it work from different color schemes.






          share|improve this answer



















          • 2





            The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon .

            – meuh
            Jul 30 '16 at 8:59














          2












          2








          2







          It seems these "morphology"s are were made having a black background as a basis. Once the image is white-on-black, the transformation works. From the documentation:




          It was original developed with binary (pure black and white) images in
          mind




          Negate the colors (so that I have white on black):



          convert black-on-white.png -negate white-on-black.png


          Then do above transformation from the question. However, I had better results with following morphology:



          convert white-on-black.png -morphology Dilate Octagon fat-white-on-black.png


          Still, nice to have would be to have it work from different color schemes.






          share|improve this answer













          It seems these "morphology"s are were made having a black background as a basis. Once the image is white-on-black, the transformation works. From the documentation:




          It was original developed with binary (pure black and white) images in
          mind




          Negate the colors (so that I have white on black):



          convert black-on-white.png -negate white-on-black.png


          Then do above transformation from the question. However, I had better results with following morphology:



          convert white-on-black.png -morphology Dilate Octagon fat-white-on-black.png


          Still, nice to have would be to have it work from different color schemes.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 30 '16 at 7:56









          tokoshtokosh

          1315




          1315








          • 2





            The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon .

            – meuh
            Jul 30 '16 at 8:59














          • 2





            The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon .

            – meuh
            Jul 30 '16 at 8:59








          2




          2





          The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon .

          – meuh
          Jul 30 '16 at 8:59





          The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon .

          – meuh
          Jul 30 '16 at 8:59


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f299218%2fimagemagick-how-to-thicken-lines%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

          is 'sed' thread safe

          How to make a Squid Proxy server?