From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laura Lazzati Subject: Re: Inverting command line session colours Date: Fri, 8 Feb 2019 20:48:17 -0300 Message-ID: References: <20190209004421.51d79015@alma-ubu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:38879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsFtF-0001OS-CI for guix-devel@gnu.org; Fri, 08 Feb 2019 18:49:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsFtC-0007xR-EG for guix-devel@gnu.org; Fri, 08 Feb 2019 18:49:01 -0500 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:35090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gsFtB-0007v4-5X for guix-devel@gnu.org; Fri, 08 Feb 2019 18:48:57 -0500 Received: by mail-pg1-x533.google.com with SMTP id s198so2259247pgs.2 for ; Fri, 08 Feb 2019 15:48:55 -0800 (PST) In-Reply-To: <20190209004421.51d79015@alma-ubu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Cc: Guix-devel 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=C3=B6rn H=C3=B6fling 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 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=3D80 --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=3D307182d4f7b1a56e220f208ad5f886e7784db115 > > $ 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: =C2=A9 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 lz= ma pangocairo png tiff x xml zlib > > # Create a postscript file we can work with: > $ echo "Hello, World!" | paps --landscape --columns=3D80 --font "Monospac= e 20" > hello-world.ps > > # This output looks good, white background, black text: > cat hello-world.ps| convert -density 128 -fill black -background white -f= latten -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 graysc= ale 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 -f= latten -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=C3=B6rn >