<story><title>Show HN: a Rust based CLI tool &apos;imgcatr&apos; for displaying images</title><url>https://github.com/SilinMeng0510/imgcatr</url><text>cat for images, by RUST</text></story><parent_chain></parent_chain><comment><author>williamcotton</author><text>If you&amp;#x27;re on MacOS an imgcat tool pairs well with an imgpbcopy tool like this:&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;williamcotton&amp;#x2F;dotfiles&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;bin&amp;#x2F;impbcopy.swift&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;williamcotton&amp;#x2F;dotfiles&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;bin&amp;#x2F;im...&lt;/a&gt;&lt;p&gt;Then create a shell function like:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  imgc() {
    tee &amp;gt;(imgcat &amp;quot;$@&amp;quot;) &amp;gt;(impbcopy -) &amp;gt; &amp;#x2F;dev&amp;#x2F;null
  }
&lt;/code&gt;&lt;/pre&gt;
So you can:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  cat image.png | imgc
&lt;/code&gt;&lt;/pre&gt;
Which will then show the image in the console, and if you switch over to another app you can simply paste in the image. And if you create a new file in Preview it will be the image in the paste buffer!</text></comment>
<story><title>Show HN: a Rust based CLI tool &apos;imgcatr&apos; for displaying images</title><url>https://github.com/SilinMeng0510/imgcatr</url><text>cat for images, by RUST</text></story><parent_chain></parent_chain><comment><author>TazeTSchnitzel</author><text>You could get better resolution in some terminals by using sixels: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;Sixel&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;Sixel&lt;/a&gt;&lt;p&gt;I think there&amp;#x27;s some other methods in particular terminals for displaying images, but I don&amp;#x27;t remember them.</text></comment>