From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] minor bug report: png spews
Date: Fri, 21 Aug 2020 11:47:26 -0700 [thread overview]
Message-ID: <253CC91A3D00087821A92B6D43237A44@eigenstate.org> (raw)
In-Reply-To: <b4ce4353-1e21-4e6b-94f1-d63b5a40ae8b@www.fastmail.com>
> looks like it's just a forgotten debug print because it only occurs with -9. oddly, there are rather a lot of lines computing just for that message.
>
> here's a patch, tested minimally. let me know if you want a different format; this is diff -c.
>
> png.c.0:132,138 - png.c:132,137
> Rawimage **array, *r, *c;
> Image *i, *i2;
> int j, ch, outchan;
> - long len;
> Biobuf b;
> char buf[32];
> static int inited;
> png.c.0:207,230 - png.c:206,211
> }
> if(nineflag){
> chantostr(buf, outchan);
> - len = (c->r.max.x - c->r.min.x) * (c->r.max.y - c->r.min.y);
> - switch(c->chandesc){
> - case CY:
> - // len *= 1;
> - break;
> - case CYA16:
> - len *= 2;
> - break;
> - case CRGB24:
> - len *= 3;
> - break;
> - case CRGBA32:
> - len *= 4;
> - break;
> - }
> - if(c->chanlen != len)
> - fprint(2, "%s: writing %d bytes for len %ld chan %s\n",
> - argv0, c->chanlen, len, buf);
> print("%11s %11d %11d %11d %11d ", buf,
> c->r.min.x, c->r.min.y, c->r.max.x, c->r.max.y);
> if(write(1, c->chans[0], c->chanlen) != c->chanlen){
Hm. Does this happen on all PNG images?
If not, do you have an example image that triggers it?
I haven't tested yet, but it looks like it's warning about
a possible miscomputation of image size.
next prev parent reply other threads:[~2020-08-21 18:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 17:31 Ethan Gardener
2020-08-21 18:42 ` [9front] " Ethan Gardener
2020-08-21 18:47 ` ori [this message]
2020-08-21 19:25 ` Ethan Gardener
2020-08-21 19:26 ` Ethan Gardener
2020-08-22 1:52 ` Alex Musolino
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=253CC91A3D00087821A92B6D43237A44@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.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.
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 NNTP newsgroup(s).