2016-07-07 158 views
3

iTerm2 iterm2图像具有可用于在终端显示图像,看到https://iterm2.com/documentation-images.html用于在协议文档的特征。不显示直列

我已经能够通过使用正确的ASCII字符和编码,以产生在所述终端的图像;此字符串(与ESC开始,并用1μg结束)

]1337;File=inline=1:iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABQtJREFUeNrsVktoXVUUXefc7/vmpUmaNonWSsFYtBZEWhRKERxI60QF6UhBOhAVEXEmzjrVQbXgTBRFB4oTlSq1FEGEiggWlKpVjG0wn9fXvE/u75zjOucmaVIrWhBB6IX9eO9+9tpr7bX3fcIYg//yENcB/33As+PX9oStr8GPvsClJ0dG1AXviIiKSYyJ1+SucFEI3KqXknFZHxpH7n0sW9Xj8UPjEA0Jk2j41wBU5+ejaOnH0NChansLmMjugB+MeDs0REsclGEC4ZHFuEAxPwOVNYfjA5PH5UgAfSnnhX/KUOFZNPWLjFZxxkd6OoKeq0COePCaPkTsQZKaKgCtDALSyM9eBG65+WLlwelZ9Usn5A0xM7X9v5VPYD8m1Ut6VmD5/RrUuRpkVEFwk4RsSRbDsgvhqi9yTVCF0LOPSohMDZtePkyw1YxTPmR+ZVft3SGKMEOEOzFanEw/D5B+2oTwa4h3kVGF/cgJVjDIzDbG1hZ7BkZJELY8f9mQbcZeRubPZY2N6hkPkTGjm0Y7J1AV04N3qshPDyHcWYE/YRvvwRSk4Et4nge9klMbjbzQ8KQpi4ZYn3aYcR/jmP9Jd3KVmtPQaIV+rfnEnu789O435hfUr63Ryt0VWJ1MSiA2SHgEFhLLJBJaYD5qpUyJXvM9mwXrZFxN/irjqB/IjaYxYfyAbuoXsjeX5nC+IaJ9MaSxmnlQTOZZQMnvKwWSEiU08HhLg8gqZ4uMWIezdhxjvEdz1VFGlW0OH1/YfO9bO0/UsGfu583FvuqYVAGWEoEBAYM4RGYkUiaUBK/XAgQBGdl+ybKfQogVHLHOee44xfiMd1nT5BA6fbk7Wj+8+dv58/d8dRrYvQlKhTBkE0ZlYsGkmRbIGT4l7nKQ+xmHmeCSEs4spjynqLq8muffZfTXxqKIw0T01I37Tr4+FGxPkcQTkLS8Zq+qse8YMTea1cAx0dqacEVWUfJoWcYUW+niaoBzjC8doGCzl4Yrvds/PLt1S95HOjUBn89IslIETHODPFeoVUO62NCgJYNGxXPWL2gYwxytGn8XBkl21f18yEpqAR/JqsFv9Zn+/TvPsYgdQxxNgX5hZ0pjqBGUgBouuUfp+knuxqFe8Z073Xmy7A0K5FmOZmyXk7nSOEcYJ32+Lp7rN6O7bvvivGqpZaRDY24XWFdra3eCxmRaZxRORzt0Tk9Y5TxXh3bFkSacZ9cGfgNTO/h7pfLlN1E7w7bZRQ9bIyCBq74SCtQj4QC5ILHUzVg96y4KWCUbvC6UQq+fIUncEnWbxp7XtiD9J1mfsXR9ynl40/cdjA36UDfUWKmhJ4wDEsatdyY2iKxRCu12pKGKqbK95HgovcbEskzygm62U7oBkJscH9ldKgfV8FS8nCDUuZPQVtfp8TtNYte/pG5JkqHTTZicTPLMbmmolIyTFFUm5+Llqyh392v2VOelvG6fXl5tPzBm2HWzf9tPS0eNNE8hZPPZg0bAyr3CDbOdL9uvZcrXFNyVXjkSlbgkVth+uZk3rndxZLePRiapUOQtilpwDgsmWnk9dcSPbx/A9u/ajV7S+VqExQ52plz0q6LYfAQNCJQpg7/+R7JygTdwkvjCzWDioVeqD08/LbfEMINyNv3ts33o0WrX/J4/X1xoHyRMzmrW0ppyrt0rT7On7rcwV+xls3ECjHsuxuLgg/xMG/HUVLn+bDHX/yb+7wH/EGAARjZ2jNWjuZgAAAAASUVORK5CYII= 

会产生这样的输出:enter image description here

然而,当我尝试显示沿着侧的另一图像,出现这种情况;串

]1337;File=inline=1:iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABQtJ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t6kW5gDbtE8vVZNP2posgxNzCfEENaPQTg3vGXiBQmYISBN0xjkShBQX6dM6ADaP4a6pn1D/9ezJ5orqDmESlgtFQ3OA39BmLwXUxiLkRjVGZPtBOwFbRmaol6GSh2HSnfF3KfKoaA+GeZeMOo5G4a9rYNvunWtES6/JoyBeXhYP0x6/FDCnQiqhJCDzR3BNsVQjRSBVZNnRremBopobXY0kY40yWo9OepRhsrqOa7J2+cbvj0w2RkstYexFlb5Ju3tQMJYJBs6zEfhkqFQOik6T57oQUKubF0IuB8wtN8q0A7OIuGixmcFtXiYTuH4EG4/O4tiJVdvTYX+PH+erXYSv0LYuxWb79e/6DfmylD+BJEcWAUzOVmZcg3VlQeM4XvUKMM3rQmP9KkhGSqjpLtYdnNnaHg73CWtflv2wXhrgkx4abjQUsAaVLQDiOEernUKw6N19MktHcrY/jUYzLZ5xgNWQc5wvGHSZmwxx3ek5Fc6n0J7c7wBX076mnV+qRJczgrCoXXS8YFKpMI46zdDtJDBstLZ/PxSmcKQAZa4dsFOYo1uPlTDRaWPs+CLSsr/D5fDE4PkhChoN5Ve87kjXygQC8qQoim6cFd77zJ97QHLvhU5eRBa4qB07BG3w3lBIH4gQmAxRN0anHOx1gD/Sau54EhU/EaFab6UZD0suMi523ote12E8CINeU3Cl4bqWE1NXZ6jywh1lmseK5JqhKhXsjpiAkVJQ1x1pvHtkq33RnYe9wMqsozP04vPpd0S8+IIcCVygvYgHFIzLCAkI5JTqyqffpIq0FHXr/lLvcDWq3Xrs5rGmd2GVYGfJDs6z43d28YipiFYeL6uSZaBLr5WuCThAF5WxvRkhBsTHGeGryZGvzIpyc93pNs/V/99L/+2AfwkwAIpSa6LlmvuQAAAAAElFTkSuQmCC 

产生enter image description here

的图像是不是内联。

连续如何确保图像保持在线?我能够在zsh和bash中重复结果。我在iTerm 2 Build 3.0.4上。

谢谢!

回答

3

解决办法有两个:

1>插入\b\33[1A在第二和第三图像的开始,根据图像的高度改变\33[1A计数(在你的情况下,出现一次)。转义序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image description here

我上面粘贴的文字是文件的内容/tmp/three

2>合并图像使用的ImageMagick,这可以参考here

enter image description here

请让我知道,如果这两种解决方案不能很好地解决问题。