9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] jpg image too big
Date: Tue, 20 Oct 2009 07:00:16 -0700	[thread overview]
Message-ID: <dd6fe68a0910200700g6e876655o53bb23274f335b11@mail.gmail.com> (raw)
In-Reply-To: <c40b3be607ba251b9b86acc785f70c8e@ladd.quanstro.net>

On Tue, Oct 20, 2009 at 5:04 AM, erik quanstrom <quanstro@quanstro.net> wrote:
> the problem is that devdraw/loadimage.c needs to load
> at least 1 scan line at a time.  unfortunately, iounit for
> drawterm ends up being 8k, so display->bufsize=8k.  the
> problem is that each scan line is over 9k in my case.
>
> i haven't looked yet to see if the kernel can deal with
> partial lines, or what could be done about the too-small
> iounit.  but it would seem to me that something has to
> give.

you can handle this in loadimage by turning a single
call with too much data per scan line into multiple
calls, each delivering a fraction of a scan line
(there is a rectangle argument that says what subsection
of the image is being loaded).

russ


  reply	other threads:[~2009-10-20 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 12:04 erik quanstrom
2009-10-20 14:00 ` Russ Cox [this message]
     [not found] <<dd6fe68a0910200700g6e876655o53bb23274f335b11@mail.gmail.com>
2009-10-20 14:14 ` erik quanstrom
2009-10-20 14:55   ` Russ Cox
     [not found] <<dd6fe68a0910200755nb397fc5jaef44a12fa3ad049@mail.gmail.com>
2009-10-20 15:04 ` erik quanstrom
2009-10-20 15:16   ` Russ Cox

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=dd6fe68a0910200700g6e876655o53bb23274f335b11@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /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).