Bug#931534: ITP: viu -- Command-line application to view images from the terminal

2019-07-07 Thread Adam Borowski
On Sun, Jul 07, 2019 at 12:15:20PM +0200, Wolfgang Silbermayr wrote:
> On 7/7/19 11:51 AM, Adam Borowski wrote:
> > On Sun, Jul 07, 2019 at 11:25:47AM +0200, Wolfgang Silbermayr wrote:
> >>Package name: viu
> >> Upstream Author: Atanas Yankov 
> >> URL: https://github.com/atanunq/viu
> >> Description:
> >> viu is a small command-line application to view images from the terminal
> >> written in Rust. It uses unicode lower half blocks to fit 2 pixels into
> >> a single cell by adjusting foreground and background colors accordingly.
> > 
> > Hi!
> > This looks exactly as what "catimg" does -- is there are any reason to
> > prefer viu over catimg?
> [...]
> > Thus: is there anything viu does better than the above tools?
> 
> In fact, catimg is new to me. I did a quick test, and it looks quite good.
> 
> I follow what is happening in the Rust crates ecosystem, so I stumbled
> over viu when it got published, and thought it would be great to have
> this tool packaged.
> 
> A quick test showed nearly identical output when scaled to the same size
> (with minimal difference in colors, I assume due to downscaling).

Even assuming identical output capabilities, there are many algorithms for
scaling and palette reduction.  And then, you need to handle 16-color,
256-color and 24-bit output (88-color being thankfully dead).
 
> What I find a bit inconvenient is that catimg defaults to the full
> terminal width whereas viu takes both height and width of the terminal
> into account.

chafa doesn't have this problem, and seems to be better than both of these
tools.

> Do you think it's a disadvantage to have some similar command-line tools
> packaged where some people would prefer one and some the other?

Yes, archive bloat puts a load on the QA team, on the mirror network and
people's machines (every package takes ~1KB of space just for the indices),
and so on.  It also wastes people's time, making them wonder which of the
tools should they use.

Thus, I'd refrain from adding redundant implementations unless there is
_some_ reason the new one is better.

> Especially with the consideration that - at least in my experience -
> rust packages require very low amount of work for packaging and maintenance?

Let's start with porting efforts: even the Rust compiler itself doesn't
build at all for 10 out of Debian architectures.  There are much better
choices than Rust for writing programs...

(But at least it supports dynamic linking, unlike certain *akhem*
competitors.)


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ According to recent spams, "all my email accounts are owned
⢿⡄⠘⠷⠚⠋  by a hacker".  So what's the problem?
⠈⠳⣄



Bug#931534: ITP: viu -- Command-line application to view images from the terminal

2019-07-07 Thread Wolfgang Silbermayr
On 7/7/19 11:51 AM, Adam Borowski wrote:
> On Sun, Jul 07, 2019 at 11:25:47AM +0200, Wolfgang Silbermayr wrote:
>>Package name: viu
>> Upstream Author: Atanas Yankov 
>> URL: https://github.com/atanunq/viu
>> Description:
>> viu is a small command-line application to view images from the terminal
>> written in Rust. It uses unicode lower half blocks to fit 2 pixels into
>> a single cell by adjusting foreground and background colors accordingly.
> 
> Hi!
> This looks exactly as what "catimg" does -- is there are any reason to
> prefer viu over catimg?

[...]

> Thus: is there anything viu does better than the above tools?

In fact, catimg is new to me. I did a quick test, and it looks quite good.

I follow what is happening in the Rust crates ecosystem, so I stumbled
over viu when it got published, and thought it would be great to have
this tool packaged.

A quick test showed nearly identical output when scaled to the same size
(with minimal difference in colors, I assume due to downscaling).

What I find a bit inconvenient is that catimg defaults to the full
terminal width whereas viu takes both height and width of the terminal
into account.

Do you think it's a disadvantage to have some similar command-line tools
packaged where some people would prefer one and some the other?
Especially with the consideration that - at least in my experience -
rust packages require very low amount of work for packaging and maintenance?

Wolfgang.



Bug#931534: ITP: viu -- Command-line application to view images from the terminal

2019-07-07 Thread Adam Borowski
On Sun, Jul 07, 2019 at 11:25:47AM +0200, Wolfgang Silbermayr wrote:
>Package name: viu
> Upstream Author: Atanas Yankov 
> URL: https://github.com/atanunq/viu
> Description:
> viu is a small command-line application to view images from the terminal
> written in Rust. It uses unicode lower half blocks to fit 2 pixels into
> a single cell by adjusting foreground and background colors accordingly.

Hi!
This looks exactly as what "catimg" does -- is there are any reason to
prefer viu over catimg?

And if you drop the requirement of a fixed 1x2 half-block grid but allow
dividing character cells in other ways, the results are DRASTICALLY better.
This is done by "chafa".  You can also restrict chafa to a particular subset
of characters, thus "chafa --symbols vhalf" makes catimg redundant.

Then, for completeness, you can abuse Braille at U+2800, which gives a 2x4
fixed grid (monochromatic or with ZX-Spectrum colors).  Needing to ANSI
codes means the result can be posted in mail or other plain-text media.
My implementation, as pointed out in ITP#856033 discussion like this,
turned out to be redundant with imagemagic's 「convert foo.png foo.ubrl」.

Thus: is there anything viu does better than the above tools?


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ According to recent spams, "all my email accounts are owned
⢿⡄⠘⠷⠚⠋  by a hacker".  So what's the problem?
⠈⠳⣄



Bug#931534: ITP: viu -- Command-line application to view images from the terminal

2019-07-07 Thread Wolfgang Silbermayr
Package: wnpp
Severity: wishlist
X-Debbugs-CC: debian-de...@lists.debian.org

   Package name: viu
Version: 0.2.1
Upstream Author: Atanas Yankov 
URL: https://github.com/atanunq/viu
License: MIT
Description:
viu is a small command-line application to view images from the terminal
written in Rust. It uses unicode lower half blocks to fit 2 pixels into
a single cell by adjusting foreground and background colors accordingly.