9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: benavento@gmail.com (Federico G. Benavento)
To: 9fans@cse.psu.edu
Subject: [9fans] page/png bug
Date: Sat,  8 Jul 2006 13:22:56 -0300	[thread overview]
Message-ID: <e983d8a90918baa9d0210c19c51684ec@yourdomain.dom> (raw)

there is a bug with .png's in page(1) and png(1)

hget http://plan9.escet.urjc.es/iwp9/banner.png | page
hget http://plan9.escet.urjc.es/iwp9/banner.png | png
(note you wont see the bug if you're not using a 32bpp display)

this doesn't happen in abaco because it doesn't draw the image that png(1)
outputs directly on the screen, it first draws it on a RGB24 image
and then draws that image on the screen

	// fd is png(1)'s stdout
	i = readimage(display, fd, 1);
	i2 = allocimage(display, i->r, RGB24, 0, DNofill);
	draw(i2, i2->r, display->black, nil, ZP);
	draw(i2, i2->r, i, nil, i->r.min);
	freeimage(i);
	// now i2 can be draw correctly on the screen

this is not a patch, because I don't know wether png(1) should output
an image that can be draw directly on the screen or page and png (without -d)
should use 2 images.



             reply	other threads:[~2006-07-08 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08 16:22 Federico G. Benavento [this message]
2006-07-09 18:52 ` Russ Cox
2006-07-09 19:09   ` Federico G. Benavento
2006-07-09 23:19   ` quanstro

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=e983d8a90918baa9d0210c19c51684ec@yourdomain.dom \
    --to=benavento@gmail.com \
    --cc=9fans@cse.psu.edu \
    /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).