2012-09-02 55 views

回答

9

一个名为cacaview的程序允许你这样做。

它是交互式的,允许您平移,缩放和更改显示模式。

Cacaview example

Full size image

3

试着问之前,使用谷歌忍者!我发现和aview

+2

现在这个页面成为第一个谷歌的答案;) – MiniScalope

1

更简单地说,您可以使用来自caca库的img2txtcacaview是一个图像浏览器,并打开一个新窗口,这不是我在这里所问的)。

例如:

$ img2txt /Users/foo/pool/libs/ipython/docs/resources/ipynb_icon_256x256.png

 .:.:.:.:.:.:.:.:.:.:.:[email protected]       
    . . . . . . . . . . . . ..:;@@t%;;X     
    . . . . . . . . . . . . . . .X8S%%8%.8   
    . . . . . . . . . . . . . . . ..8Xttt%S8.   
    . . .. . . . . . . . . . . . . .8;%88888S   
    . . . . . . . . . . . . . . . . ..8X. . .t  
    .tS%SSS X . :[email protected]:@. . . . . . . .. . . . t  
    . .%:S . [email protected];[email protected]@:; .X8%[email protected] . . [email protected] . .;  
    . . t;@ . . @SS. .S;8 @@. .:8. %%[email protected] 8X8t  
    . . %tX . . @S8 [email protected]@[email protected]: .X:;.tX..8.:[email protected]%tt  
    . . ttX. . .8tt;[email protected] .8: . @8X.X .%88... t  
    . . %tX . . @[email protected]::. . . 88 ...; X% . 88:.S8;t  
    . . ttX . . @X8 . . . .88 . :.;. .88S.%88t  
    .t88 ; 88. .8SS. . . ..88.%[email protected] 8. 8X88;. .;  
    . S%SStSS. .;S.. . . ..:%XX:;; . .;X%;... t  
    . . . . . . . . . . . @XX8;.. . . . . . t  
    . ;@XXX t. .. . .S88%. % %@. . . .. . . . t  
    . %[email protected] . . S888 . 888:. . . . . . . t  
    . S888888 ;. . . .. [email protected]:.: 88 . . . . . .;  
    . %888%888 . . S888.:8%88: X8%tS8t.. . .;  
    . S888.X888;. . .. @[email protected] :;[email protected] . t  
    . :8.X% 8888%.. [email protected]:8S8t88.%[email protected]%. .;  
    [email protected]:88t. ..% 88t ;[email protected];:.... 88888..t  
    . S888S : [email protected] .;88X..%:888. ..  888. t  
    . t8:XS. ..:888;[email protected]: 88 .. . .888X:.;  
    . X888; . . ;:[email protected]:88:[email protected] . . . %88:8.t  
    . %8 8S. .. 8888; @8S..:888 . . .8888 t  
    . %888;. .. 888SX;@8:.;8888 . . ..8S88:.;  
    . [email protected];. . :8:88888;.t8888S.. . :X8888: t  
    . %88 X . . ...:888888;.;88888:tXSS8888t.. t  
    . %[email protected] . . SX88X8: [email protected]%88. . t  
    . tt.. . . .. .::t:t .:.%S. X8%X8;: . . t  
    . . . . . . . .... . ..... ....: . . . t  
    %[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]  

MacOSX上$

,你可以使用自制软件:

$ brew reinstall libcaca --with-imlib2 

(imlib用于从不同格式转换)

+0

libcaca的默认Homebrew安装(即,不通过'--with-imlib2')似乎无法打开任何文件。 – bonh

0

另一种选择是使用Ipython笔记本:它非常擅长处理您的要求。

对于bash:你必须在命令前加上一个bang。 对于图像:您可以使用ipython中的rich display system

结果的截图:在这个post

screenshot of the result

完整的答案。

1

高质量的快速独立转换实用程序(提供您有256色终端)是pxl,可在https://github.com/ichinaski/pxl处获得。

声明:我与开发人员没有任何共同之处,但我很欣赏他的工作。