Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Probleme mit GraphicsMagick node.js

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Probleme mit GraphicsMagick node.js

    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      uwe72 last edited by

      Versuche gerade GraphicsMagick in ioBroker zu integrieren um Bilder zu manipulieren. Als Ziel möchte ich im Rahmen von Bilderkennung um die erkannte Personen einen "Kasten" zeichen.

      Vorgegangen bin ich nach dieser Anleitung (zur Installation von gm)
      https://aheckmann.github.io/gm/

      Mein Code (nur mal als Test):

      var gm = require('gm');
      
      function doResize() {
          log("Detection!");
          gm('/opt/iobroker/test.jpg')
              .resize(353, 257)
              .autoOrient()
              .write('/opt/iobroker/output.jpg', function (err) {
                  if (err) {
                      console.log('Error!!!' + err);
                  } else {
                      console.log('Hat funktioniert!');
                  }
              });
      }
      
      doResize();
      setInterval(function() { 
          doResize();
      }, 5000*1);   
      

      Bekomme dann folgenden Fehler:

      Could not execute GraphicsMagick/ImageMagick: gm "identify" "-ping" "-format" "%[EXIF:Orientation]" "/opt/iobroker/test.jpg" this most likely means the gm/convert binaries can't be found
      

      Kann mir hier jemand helfen? DANKE!

      Thomas Braun 1 Reply Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @uwe72 last edited by Thomas Braun

        @uwe72

        Modul ist drin?

        cd /opt/iobroker 
        npm list gm
        

        Image/GraphicsMagick ist aber installiert?

        apt policy imagemagick graphicsmagick
        
        U 1 Reply Last reply Reply Quote 0
        • U
          uwe72 @Thomas Braun last edited by

          @thomas-braun
          32ced46b-b876-4c76-8d1b-db243a911436-image.png

          Thomas Braun U 2 Replies Last reply Reply Quote 0
          • Thomas Braun
            Thomas Braun Most Active @uwe72 last edited by Thomas Braun

            @uwe72
            docker auf synology?

            Und bitte keine Screenshots von TEXTEN.

            U 2 Replies Last reply Reply Quote 0
            • U
              uwe72 @uwe72 last edited by

              @Thomas-Braun

              root@iobroker:/opt/iobroker# apt policy imagemagick graphicsmagick
              imagemagick:
                Installiert:           (keine)
                Installationskandidat: 8:6.9.10.23+dfsg-2.1+deb10u1
                Versionstabelle:
                   8:6.9.10.23+dfsg-2.1+deb10u1 500
                      500 http://deb.debian.org/debian buster/main amd64 Packages
                      500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
              graphicsmagick:
                Installiert:           (keine)
                Installationskandidat: 1.4+really1.3.35-1~deb10u1
                Versionstabelle:
                   1.4+really1.3.35-1~deb10u1 500
                      500 http://deb.debian.org/debian buster/main amd64 Packages
                      500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
              root@iobroker:/opt/iobroker#
              
              
              1 Reply Last reply Reply Quote 0
              • U
                uwe72 @Thomas Braun last edited by

                @thomas-braun

                Ist docker auf einer NUC

                Thomas Braun 1 Reply Last reply Reply Quote 0
                • U
                  uwe72 @Thomas Braun last edited by

                  @thomas-braun ok sorry, dachte nur Screenshot wegen den Linien

                  1 Reply Last reply Reply Quote 0
                  • Thomas Braun
                    Thomas Braun Most Active @uwe72 last edited by

                    @uwe72
                    Da wird nicht als root hantiert.

                    U 1 Reply Last reply Reply Quote 0
                    • U
                      uwe72 @Thomas Braun last edited by

                      @thomas-braun hatten wir schon heute 🙂

                      Thomas Braun 1 Reply Last reply Reply Quote 0
                      • Thomas Braun
                        Thomas Braun Most Active @uwe72 last edited by

                        @uwe72 Das hat sich dann auch nicht geändert. root ist TABU auf 'normalen' Systemen.

                        U 1 Reply Last reply Reply Quote 0
                        • U
                          uwe72 @Thomas Braun last edited by

                          @thomas-braun ok, habe ich nun gelernt. werde ich zukünftig ändern!

                          Thomas Braun 1 Reply Last reply Reply Quote 0
                          • Thomas Braun
                            Thomas Braun Most Active @uwe72 last edited by

                            @uwe72 Künftig?

                            U 1 Reply Last reply Reply Quote 0
                            • U
                              uwe72 @Thomas Braun last edited by

                              @thomas-braun ab sofort 🙂

                              Thomas Braun 1 Reply Last reply Reply Quote 0
                              • Thomas Braun
                                Thomas Braun Most Active @uwe72 last edited by Thomas Braun

                                @uwe72
                                Als erfahrener Admin, der permanent root notwendig findet und weiß was er tut, kannst du ja die fehlende Magick nun nach installieren.

                                U 1 Reply Last reply Reply Quote 0
                                • U
                                  uwe72 @Thomas Braun last edited by

                                  @thomas-braun hab nie gesagt, dass ich ein erfahrener Admin bin.

                                  DANKE!
                                  Hat funktioniert und läuft nun.

                                  Thomas Braun 1 Reply Last reply Reply Quote 0
                                  • Thomas Braun
                                    Thomas Braun Most Active @uwe72 last edited by Thomas Braun

                                    @uwe72 sagte in Probleme mit GraphicsMagick node.js:

                                    hab nie gesagt, dass ich ein erfahrener Admin bin.

                                    Dann meld dich auch nicht als solcher am System an.

                                    Wobei, du hast natürlich Recht. Erfahrene Admins melden sich ja eben nicht als root an. Daran erkennt man immer die User mit dem Halbwissen.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post

                                    Support us

                                    ioBroker
                                    Community Adapters
                                    Donate

                                    891
                                    Online

                                    31.8k
                                    Users

                                    80.0k
                                    Topics

                                    1.3m
                                    Posts

                                    2
                                    16
                                    528
                                    Loading More Posts
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    Community
                                    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                    The ioBroker Community 2014-2023
                                    logo