Giter VIP home page Giter VIP logo

asciify's Introduction

Asciify

PowerShell Gallery Codacy Badge

Convert Images to ASCII Pictures

preview

Description

Convert any image to ASCII picture by representing each pixels grayscale value as an ASCII character. The higher the grayscale value resp. the lighter the pixel the more space the corresponding ASCII character fills on the screen therefore reassembling the image well on dark console backgrounds with light font colors. On light console backgrounds with dark font colors use the -Invert switch to adjust. Before being processed the image will be resized in memory to make the resulting ASCII picture fit the console's width later on. To fit the console's height instead use the -FitConsoleHeight switch. Otherwise, if you don't want the resulting ASCII picture's dimensions determined by the script automatically at all you can specify a custom width and height using the -Width and -Height parameters. This can be useful when exporting ASCII pictures of custom sizes into textfiles, e.g (Note: i2a is an alias for Convert-ImageToAscii):

gci .\bobby-fischer.jpg | i2a -Width 160 -Height 80 -Resolution Mid -Invert > .\bobby-fischer.txt

Note: -Width and -Height must be specified manually when running the Cmdlet from PowerShell hosts not reporting its console dimensions like PowerShell ISE.

Furthermore, the Cmdlet supports three different resolutions regarding the resulting ASCII picture. These are Low, Mid and High and can be specified by the -Resolution parameter. On higher resolutions the resulting ASCII picture will be made up with more ASCII characters yielding a more fine-grained picture. Depending on the image a higher resolution sometimes may tend to look better especially when using smaller font sizes or bigger dimensions.

Installation

Install from PowerShell Gallery

Install-Module -Name Asciify

or

git clone https://github.com/tobiohlala/Asciify

Usage

Import-Module Asciify

Convert-ImageToAscii .\bobby-fischer.jpg

Examples

Get-Help Convert-ImageToAscii -Examples

asciify's People

Contributors

tobiohlala 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

Watchers

 avatar  avatar  avatar

Forkers

theotherside

asciify's Issues

cannot call a method on a null-valued expression

PS C:\Users\kris> Convert-ImageToAscii -Path C:\temp\rabbit.jpg
You cannot call a method on a null-valued expression.
At C:\Users\kris\OneDrive\Documents\WindowsPowerShell\Modules\Asciify\1.3.0\Asciify.psm1:180 char:13
'+ $wrapMode.Dispose()
'+ ~~~~~~~~~~~~~~~~~~~
' + CategoryInfo : InvalidOperation: (:) [], RuntimeException
' + FullyQualifiedErrorId : InvokeMethodOnNull

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.