Giter Club home page Giter Club logo

asciify-image's People

Contributors

ajay-gandhi avatar dependabot[bot] avatar jpbm135 avatar kodie avatar lropero avatar ta2edchimp avatar uxkjaer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

asciify-image's Issues

isWindows

On importing import asciify from 'asciify-image'; , I get a Type error error saying: TypeError: isWindows is not a function

Remove `npm` from dependencies?

Hi, I've been using your library to log images under Node.js with good results, very helpful indeed when debugging WebGL related code running in headless mode.

However, a problem with this library is that it lists npm as a dependency which while unused, is just too heavy for our app installs. If you could move npm to devDependencies (or completely remove it from package.json) things would look much better.

https://github.com/ajay-gandhi/asciify-image/blob/master/package.json#L13

asciify-image can’t be installed on current node/npm on OSX 10.12.1 …

Hello there, unfortunately, asciify-image can’t be installed on current node/npm on OSX 10.12.1 … some problem with lwip and/or lodash. Could you maybe look into this? Thank you very much.

npm install asciify-image

[email protected] install node_modules/asciify-image/node_modules/lwip
node-gyp rebuild

 CXX(target) Release/obj.target/lwip_decoder/src/decoder/init.o
In file included from ../src/decoder/init.cpp:1:
In file included from ../src/decoder/decoder.h:13:
In file included from ../../nan/nan.h:182:
../../nan/nan_maybe_43_inl.h:221:17: warning: 'CloneElementAt' is deprecated [-Wdeprecated-declarations]
 return array->CloneElementAt(GetCurrentContext(), index);
               ^
/Users/and1/.node-gyp/7.0.0/include/node/v8.h:3056:36: note: 'CloneElementAt' has been explicitly marked deprecated here
               MaybeLocal<Object> CloneElementAt(Local<Context> context,
                                  ^
In file included from ../src/decoder/init.cpp:1:
In file included from ../src/decoder/decoder.h:13:
In file included from ../../nan/nan.h:188:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:40:29: warning: 'New' is deprecated [-Wdeprecated-declarations]
 return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                           ^
/Users/and1/.node-gyp/7.0.0/include/node/v8.h:4048:56: note: 'New' has been explicitly marked deprecated here
 V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
                                                      ^
In file included from ../src/decoder/init.cpp:1:
In file included from ../src/decoder/decoder.h:13:
../../nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
     v8::Isolate::GCEpilogueCallback callback
     ~~~~~~~~~~~~~^
../../nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
     v8::Isolate::GCEpilogueCallback callback) {
     ~~~~~~~~~~~~~^
../../nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
     v8::Isolate::GCPrologueCallback callback
     ~~~~~~~~~~~~~^
../../nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
     v8::Isolate::GCPrologueCallback callback) {
     ~~~~~~~~~~~~~^
../../nan/nan.h:1927:15: warning: 'SetAccessor' is deprecated [-Wdeprecated-declarations]
 return obj->SetAccessor(
             ^
/Users/and1/.node-gyp/7.0.0/include/node/v8.h:2761:22: note: 'SetAccessor' has been explicitly marked deprecated here
               bool SetAccessor(Local<Name> name,
                    ^
3 warnings and 4 errors generated.
make: *** [Release/obj.target/lwip_decoder/src/decoder/init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.1.0
gyp ERR! command "/usr/local/Cellar/node/7.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd node_modules/asciify-image/node_modules/lwip
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
./
└── (empty)

npm WARN enoent ENOENT: no such file or directory, open ‘./package.json'
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/7.0.0/bin/node" "/usr/local/bin/npm" "install" "asciify-image"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the lwip package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lwip
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lwip
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     npm-debug.log
npm ERR! code 1

Extra wide images don't get resized correctly

When trying to asciify an extra wide image such as this: http://placehold.it/620x140/ff00/00ff using the CLI tool, the image should get resized to fit the terminal, however it doesn't.

My image is 620 pixels wide by 140 pixel high.
My terminal is 125 columns wide by 25 rows high.

My image ends up looking like this:
screen shot 2018-01-08 at 10 17 17 am

However, if I set the c-ratio to 1, it comes out okay:
screen shot 2018-01-08 at 10 19 31 am

I'm not really sure why this happens and I'm going to do some more digging to see if I can come up with a solution but I figured I would document it on here.

Can't specify height with `-h` option as CLI

-h option means --help.
But help message describes that -h means --height

$ asciify image.jpg -h 200

  Usage: asciify [options] [path]

  Options:

    -c, --color      true for color, false for B/W
    -r, --c-ratio    character width-height ratio
    -f, --fit        resize rule: box, height, width, original, none
    -h, --height     height to resize to
    -w, --width      width to resize to

  See the readme for detailed options and defaults

  Example:

    $ asciify lolwut.png -c false

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.