unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Laura Lazzati <laura.lazzati.15@gmail.com>
To: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Inverting command line session colours
Date: Fri, 8 Feb 2019 20:48:17 -0300	[thread overview]
Message-ID: <CAPNLzUNX9JVzTd2NUVM2HeAe0jHj_XiQeWY3q8A0DpMuhFppCw@mail.gmail.com> (raw)
In-Reply-To: <20190209004421.51d79015@alma-ubu>

Go to bed Bruno :) I will be writing another mail, and answer back
this one. but go to bed! your intern will tell Sage, you have to
recover from your cold.
On Fri, Feb 8, 2019 at 8:44 PM Björn Höfling
<bjoern.hoefling@bjoernhoefling.de> wrote:
>
> Hi Laura,
>
> this kept me awake, I had to open my laptop again :-)
>
> On Fri, 8 Feb 2019 19:53:50 -0300
> Laura Lazzati <laura.lazzati.15@gmail.com> wrote:
>
> > Hi!
> > > convert xyz.ps -background white -flatten -negate xyz.png
> > I had already tried the -negate before but didn't work, I only got
> > full white pngs (the text turned white)
> > I am running  imagemagick    6.9.10-14 this is the rule:
> > -------------starts----------------
> > (VIDEO)/$(LOCALE_LANG)/out/$(SESSION)-%.png:
> > $(VIDEO)/$(LOCALE_LANG)/out/$(SESSION)-%.txt
> >     tail -n 20 $< | \
> >     paps --landscape --columns=80 --font "Monospace 20" | \
> >     convert -density 128 \
> >             -fill black \
> >             -background white \
> >             -flatten \
> >             -rotate 90 \
> >             -delete 0--2 - $@
> > -------ends-------------------
>
> I can confirm this problem, let's track it down the Guix way:
>
> ## Make sure we are really talking about the same, getting into a fresh
> container of latest guix:
>
> # To make sure you are at the same commit where I tested this, you
> could do a:
> $ guix pull --commit=307182d4f7b1a56e220f208ad5f886e7784db115
>
> $ guix describe
> Generation 46   Feb 08 2019 23:58:31    (current)
> [.. other channels here ..]
>   guix 307182d
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 307182d4f7b1a56e220f208ad5f886e7784db115
>
> $ cd /tmp
> $ mkdir tst
> $ cd tst
> # really get into a container, to be extra sure!
> /tmp/tst$ guix environment -C --ad-hoc coreutils less imagemagick paps
>
> $ convert -version
> Version: ImageMagick 6.9.10-14 Q16 x86_64 2018-11-14 https://imagemagick.org
> Copyright: © 1999-2018 ImageMagick Studio LLC
> License: https://imagemagick.org/script/license.php
> Features: Cipher DPC OpenMP
> Delegates (built-in): bzlib fftw fontconfig freetype gvc jng jpeg lcms lzma pangocairo png tiff x xml zlib
>
> # Create a postscript file we can work with:
> $ echo "Hello, World!" | paps --landscape --columns=80 --font "Monospace 20" > hello-world.ps
>
> # This output looks good, white background, black text:
> cat hello-world.ps| convert -density 128 -fill black -background white -flatten -rotate 90 -delete 0--2 - out.png
>
> # Though I'm getting this warning, is that the problem?:
> # convert: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `out.png' @ warning/png.c/MagickPNGWarningHandler/1667.
>
> # This produces only whiteness:
> # Same warning as above:
> cat hello-world.ps| convert -density 128 -fill black -background white -flatten -rotate 90 -delete 0--2 -negate - out-negated.png
>
> #But at least this works afterwards: White text on black background:
> convert out.png -negate outout.png
>
>
>
> Conclusion: As a quick workaround, you can add another pipe and use
> convert twice.
>
> But there should be a way to do it in one way. ImageMagick is a bit
> tricky in that. I have no idea for now.
>
> As reference, I'm attaching my output files.
>
> Björn
>

  reply	other threads:[~2019-02-08 23:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 15:01 Inverting command line session colours Laura Lazzati
2019-02-08 20:00 ` Gábor Boskovits
2019-02-08 22:53   ` Laura Lazzati
2019-02-08 23:44     ` Björn Höfling
2019-02-08 23:48       ` Laura Lazzati [this message]
2019-02-09 10:55       ` Ricardo Wurmus
2019-02-09 12:12         ` Laura Lazzati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPNLzUNX9JVzTd2NUVM2HeAe0jHj_XiQeWY3q8A0DpMuhFppCw@mail.gmail.com \
    --to=laura.lazzati.15@gmail.com \
    --cc=bjoern.hoefling@bjoernhoefling.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).