Re: pngcairo terminal: "crop" does different things if background color is specified

Ethan A Merritt <[email protected]> Tue, 29 Nov 2022 12:34:31 -0800
Newsgroups gmane.comp.graphics.gnuplot.devel
Message-ID <CALUAmEtj4hgh2HFASZ9jR2MeoP=U8_grQakqiB6zdq28qU7gZg@mail.gmail.com>
On Monday, 28 November 2022 22:55:34 PST Ethan A Merritt wrote:
> On Monday, 28 November 2022 21:52:19 PST Dima Kogan wrote:
> > Hi. I'm using a recent gnuplot shipped in Debian, and I'm seeing an odd
> > behavior.
> >
> > I make a trivial .png plot like so:
> >
> >   set terminal pngcairo size 1024,768 notransparent crop
> >   set output "/tmp/tst.png"
> >   plot x
> >
> > Because of the "crop", the resulting image size is a bit smaller than
> > requested. "file /tmp/tst.png" says:
> >
> >   tst.png: PNG image data, 995 x 751, 8-bit/color RGB, non-interlaced
>
> > But if I change the background color by adding to the end of the "set
> > terminal" command:
> >
> >   background "#e8dfd0"
> >
> > then I get a full 1024x768 image. This shouldn't happen: the background
> > color should not be doing anything to the image size.
>
> True.  The current code seems to only test for transparent/non-transparent.
> It should also test for background/non-background.
>
> That's a fixable bug specific to cairopng.

Fixed now.


        Ethan


_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta