IonicaBizau / image-to-ascii

:floppy_disk: A Node.js module that converts images to ASCII art.
http://ionicabizau.net/blog/16
MIT License
1.58k stars 106 forks source link

Error: Stream yields empty buffer #71

Open RayRama opened 3 years ago

RayRama commented 3 years ago

I didn't know what happen. When i check gm and lwip library, it was available in dir, the installation process also no problem

Error: Stream yields empty buffer at Socket. (C:\JS - Project\NodeJS basic\node_modules\gm\lib\command.js:57:17) at Socket.emit (node:events:406:35) at endReadableNT (node:internal/streams/readable:1331:12) at processTicksAndRejections (node:internal/process/task_queues:83:21), Error: Command failed: at ChildProcess.onExit (C:\JS - Project\NodeJS basic\node_modules\gm\lib\command.js:301:17) at ChildProcess.emit (node:events:394:28) at ChildProcess.cp.emit (C:\JS - Project\NodeJS basic\node_modules\cross-spawn\lib\enoent.js:40:29) at maybeClose (node:internal/child_process:1067:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) { code: 3222601730, signal: null }

chekyassine commented 2 years ago

same issue, any workarounds ? tested on windows 11 with latest versions

liudonghua123 commented 2 years ago

I have the same issue, it seemed not work on windows terminal.

D:\code\python>npm install --global image-to-ascii-cli

added 101 packages, and audited 102 packages in 40s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

D:\code\python>image-to-ascii -i D:\Pictures\1504838-smart-farm\png\027-farmer.png
error Stream yields empty buffer
error Command failed:

D:\code\python>
liudonghua123 commented 2 years ago

I tried a few other tools, I can use https://github.com/TheZoraiz/ascii-image-converter, https://github.com/ajay-gandhi/asciify-image on windows terminal.

D:\code\python>asciify D:\Pictures\1504838-smart-farm\png\027-farmer.png

                                  ii11111111;;          ;;ii1111ii;;
                                iittttttttttttii      ;;111111111111;;
                              iittttttttttttttttii;;;;1111111111111111;;
                            ;;tttttttttttttttttttttt11111111111111111111;;
                          ;;11tttttttttttttttttttttt1111111111111111111111;;
                          iitttttttttttttttttttttttt1111111111111111111111;;
                        ;;tttttttttttttttttttttttttt111111111111111111111111::
                        iitttttttttttttttttttttttttt111111111111111111111111;;
                        11tttttttttttttttttttttttttt111111111111111111111111ii
                        11tttttttttttttttttttttttttt111111111111111111111111ii
                        tttttttttttttttttttttttttttt11111111111111111111111111
                      ;;tttttttttttttttttttttttttttt11111111111111111111111111;;
                      ;;tttttttttttttttttttttttttttt11111111111111111111111111::
    ii1111iiii        ;;tttttttttttttttttttttttttttt11111111111111111111111111::        ;;iiii;;;;
  11ffLLLLLLff11      ;;tttttttttttttttttttttttttttt11111111111111111111111111::      iittttttttttii
iiffLLLLLLLLLLff11    ;;tttttttttttttttttttttttttttt11111111111111111111111111::    ;;tttttttttttttt;;
ttLLLLLLLLLLLLLLfftt11iitttttttttttttttttttttttttttt11111111111111111111111111;;ii11tttttttttttttttt11
ffLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLfftttttttttttttttttttttttttttttttttttttttttttttttttt
ffLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLfftttttttttttttttttttttttttttttttttttttttttttttttttt
ffLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLfftttttttttttttttttttttttttttttttttttttttttttttttttt
11LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLffttttttttttttttttttttttttttttttttttttttttttttttttii
iittLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLfftttttttttttttttttttttttttttttttttttttttttttttt11;;
  iittLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLfftttttttttttttttttttttttttttttttttttttttttttt11;;
    iittffLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLffttttttttttttttttttttttttttttttttttttttttttii;;
        11ttffLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLfftttttttttttttttttttttttttttttttttttttt11;;
          ffGGCCCCLLLLLLCCCCCCCCCCCCCCCCCCCCCCCCCCLLffffffffffffffffffffffffffffffffffffff11
          ffGGGGGGGGGG000000000000000000000000000000GGGGGGGGGGGGGGGGGGGGGGGGGGCCLLLLLLLLLL11
          ffGGGGGGGGGG000000000000000000000000000000GGGGGGGGGGGGGGGGGGGGGGGGGGCCLLLLLLLLLL11
          ffGGGGGGGGGG00000000000000CCLLLLLLLL000000GGGGffffffffLLGGGGGGGGGGGGGGLLLLLLLLLL11
            CCGGGGGGGG000000000000CCttttttttttLL0000GGff1111111111LLGGGGGGGGGGGGLLLLLLLLff
            LLGGGGGGGG000000000000GGttttttttttCC0000GGLL1111111111CCGGGGGGGGGGGGLLLLLLLL11
              LLGGGGGG00000000000000GGGGGGGGGG000000GGGGCCLLLLLLCCGGGGGGGGGGGGGGLLLLLLtt
                ffCCGG000000000000000000000000000000GGGGGGGGGGGGGGGGGGGGGGGGGGGGLLff11
                    ffGG0000000000000000000000000000GGGGGGGGGGGGGGGGGGGGGGGGGGCC11
                      CC0000000000000000000000000000GGGGGGGGGGGGGGGGGGGGGGGGGGLL
                      LL00000000000000000000CCCC0000GGCCCCGGGGGGGGGGGGGGGGGGGGff
                        GG0000000000000000CCLLLLLLCCLLLLLLCCGGGGGGGGGGGGGGGGCC
                        LL0000000000000000GGLLLLLLLLLLLLLLCCGGGGGGGGGGGGGGGGLL
                          GG0000000000000000GGCCLLLLLLLLGGGGGGGGGGGGGGGGGGCC
                          LLGG00000000000000000000GGGGGGGGGGGGGGGGGGGGGGGGff
                            LL0000000000000000000000GGGGGGGGGGGGGGGGGGGGff
                              LL00000000000000000000GGGGGGGGGGGGGGGGGGff
                                LLGG0000000000000000GGGGGGGGGGGGGGCCff
                                    CCGG000000000000GGGGGGGGGGCCLL
                                        LLCCGG000000GGGGCCCCLL
                                              LLLLffffff

D:\code\python>ascii-image-converter D:\Pictures\1504838-smart-farm\png\027-farmer.png

                                   .:::::::.             .:::::..
                                .:-----------:        .::::::::::::.
                              .----------------:.. ..::::::::::::::::.
                             :--------------------:::::::::::::::::::::
                           .----------------------::::::::::::::::::::::
                          .-----------------------:::::::::::::::::::::::.
                         .------------------------::::::::::::::::::::::::
                         -------------------------:::::::::::::::::::::::::
                        :-------------------------:::::::::::::::::::::::::.
                        --------------------------::::::::::::::::::::::::::
                       .--------------------------::::::::::::::::::::::::::.
                       .--------------------------::::::::::::::::::::::::::.
                       .--------------------------::::::::::::::::::::::::::.
     .:::::..          .--------------------------::::::::::::::::::::::::::.           ..:::..
  .-==========:        .--------------------------::::::::::::::::::::::::::.        :----------:.
 :==============:      .--------------------------::::::::::::::::::::::::::.      .--------------:
:==================-----==========================--------------------------::::::-----------------:
==================================================--------------------------------------------------
==================================================--------------------------------------------------
.=================================================-------------------------------------------------.
 .================================================------------------------------------------------.
   :==============================================----------------------------------------------.
     .-===========================================-------------------------------------------:.
        :-========================================----------------------------------------:.
           .+*+++=================================-----------------------------------===
           .%%%%########%%%%%%%%%%%%%%%%%%%%%%%%%%##########################*+++********.
           =##%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%***********-
           -%#%%%%%%%#%%%%%%%%%%%%%%#########%%%%%%%#%%*********#%#%%%%%%%%#%#**********:
            *%#%%%%%%%%%%%%%%%%%%%#=---------=#%%%%%%#-::::::::::*%%%%%%%%%%%#*********+
            .*%%###%%%%%%%%%%%%%%@*:---------:*@%%%#%*...........+%#%%%%%%%%%%********+.
              =#%%%%#%%%%%%%%%%%%%%#+++++++++#%%%%%%%%*=========*%%%%%%%%%%%%#*******-
                -+*#%%%%%%%%%%%%%%%@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#***+=:
                   ..:*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###########%%%%%%%%%%#%+..
                      .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%.
                       +%%%%%%%%%%%%%%%%%%%###%%%%%%%#####%%%%%%%%%%%%%%%%#%+
                        *%%%%%%%%%%%%%%%%%******###*******#%%%%%%%%%%%%%%#%*
                         *%%%%%%%%%%%%%%%%****************#%%%%%%%%%%%%%#%*
                          +%%%%%%%%%%%%%%%%%#***********#%%%%%%%%%%%%%#%%+
                           -%%%%%%%%%%%%%%%%%%%%%######%%%%%%%%%%%%%#%%#-
                            .+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%%#=.
                              .=%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###%%%#=.
                                 -*%%%%%%%%%%%%%%%%%%%######%%%%#+-
                                    :+#%%%%%%%%%%%%%%%%%%%%%#*=:
                                        :-=+*##%%%####**+=-:

D:\code\python>