From: andrey mirtchovski <mirtchov@cpsc.ucalgary.ca>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] always go for overkill, err vismon
Date: Fri, 16 Jan 2004 11:56:30 -0700 [thread overview]
Message-ID: <Pine.LNX.4.44.0401161037010.15175-100000@fbsd.cpsc.ucalgary.ca> (raw)
In-Reply-To: <017301c3dc24$b2cb30e0$67844051@SOMA>
My setup includes the following machines (listed with available ram):
1.7GB ram cpu server
512MB ram cpu server
160MB ram terminal running in vmware
on all those machines, either sitting behind the terminal, connecting via
drawterm or running in a vnc session I get exactly the same behaviour when
reading Boyd's jpg scan -- namely "page file.jpg" fails with:
warning: couldn't read image: readimage: image too wide for buffer
on the other hand jpg -c file.jpg | page works! turns out that page uses
jpg -t9 file.jpg
to convert the image to Plan 9 format. looking at the man page for jpg:
-c Convert the image to a Plan 9 representation, as
defined by image(6), and write it to standard output.
-9 Like -c, but produce an uncompressed image. This saves
processing time, particularly when the output is being
piped to another program such as page(1), since it
avoids compression and decompression.
-t Convert the image, if it is in color, to a true color
RGB image.
the files that result from the conversion of Boyd's image have the
following sizes:
--rw-rw-r-- M 1178 andrey andrey 1676944 Jan 16 10:09 c.bit
--rw-rw-r-- M 1178 andrey andrey 22857190 Jan 16 11:17 9.bit
--rw-rw-r-- M 1178 andrey andrey 68571450 Jan 16 11:13 t.bit
(ordered by option used -- -c -9 and -t9 respectively). readimage() can
handle the first two even on my puny 160mb vmware terminal but chokes on
the third one...
a possible solution is to use Memimage instead of Image -- readmemimage()
can apparently handle even the biggest of the three. I have hacked page to
use memimages, displaying only a part that is clipped by the screen
coordinates. there are ways to be smart about how much of the image is
loaded at any time, but it'll require more than a late afternoon of thinking and
a morning of tinkering. the conversion between Memimage and Image is non trivial
and it'll be great if we had a couple of library routines we could use to
draw from one onto the other (or maybe i fail to see them in the man
pages). the way it's done in the hacked page is to writememimage() to
one end of a pipe and readimage() from the other.
all of this impacts performance negatively, of course :)
andrey
next prev parent reply other threads:[~2004-01-16 18:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-14 9:34 Jeff Sickel
2004-01-14 9:53 ` Fco.J.Ballesteros
2004-01-14 9:56 ` Anders Soendergaard
2004-01-14 20:14 ` boyd, rounin
2004-01-15 9:55 ` Jeff Sickel
2004-01-15 15:29 ` mirtchov
2004-01-15 20:26 ` Christopher Nielsen
2004-01-15 20:42 ` rog
2004-01-15 20:59 ` mirtchov
2004-01-21 22:16 ` Chris Hollis-Locke
2004-01-16 11:34 ` boyd, rounin
2004-01-16 18:56 ` andrey mirtchovski [this message]
2004-01-16 19:02 ` mirtchov
2004-01-16 19:09 ` Sape Mullender
2004-01-14 21:49 ` boyd, rounin
-- strict thread matches above, loose matches on Subject: below --
2004-01-15 8:59 Skip Tavakkolian
2004-01-16 11:22 ` boyd, rounin
2004-01-14 9:58 Tiit Lankots
2004-01-13 9:10 [9fans] Re: USB - your contribution Lucio De Re
2004-01-13 11:42 ` [9fans] always go for overkill, err vismon boyd, rounin
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=Pine.LNX.4.44.0401161037010.15175-100000@fbsd.cpsc.ucalgary.ca \
--to=mirtchov@cpsc.ucalgary.ca \
--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).