9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@gmx.de
To: 9fans@9fans.net
Subject: Re: [9fans] page fit to window does not work on large jpegs
Date: Thu, 12 Apr 2012 20:56:37 +0200	[thread overview]
Message-ID: <0198089a28f684163b621d0d75178ed2@rei2.9hal> (raw)
In-Reply-To: <20120408183539.GC2245@krabbe.dyndns.org>

this is fixed in 9front. the problem is this:

kernel devdraw needs full draw rpc messages in every write(). but
9p has a io unit. libdraws loadimage will fill its its io buffer
with a number of scanlines and then do a rpc until the whole image
is loaded. if the size of a single scanline exceeds the buffer size,
it will fail.

our solution was to make loadimage split the scanlines in that case,
so no matter how wide the image gets, it will get loaded correctly.

also, the compressed image format has a similar limitation. we changed
writememimage to produce uncompressed images if the compressed
blocksize would exceed the buffer.

--
cinap



  parent reply	other threads:[~2012-04-12 18:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-08 18:35 Ingo Krabbe
2012-04-12 17:47 ` andrey mirtchovski
2012-04-12 18:23   ` Ingo Krabbe
2012-04-12 18:31     ` erik quanstrom
2012-04-12 20:43       ` Ingo Krabbe
2012-04-12 20:46         ` erik quanstrom
2012-04-12 18:56 ` cinap_lenrek [this message]
2012-04-12 20:59   ` erik quanstrom
2012-04-12 19:20     ` cinap_lenrek
2012-04-12 21:35       ` erik quanstrom
2012-04-13  7:38         ` Charles Forsyth
2012-04-13  7:39           ` Charles Forsyth
     [not found]           ` <CAOw7k5iv+gxQKsv33tcGdx0FJ3F68EwaVXDqR1HF=_7CnzsyPg@mail.gmail.c>
2012-04-13 12:13             ` erik quanstrom
2012-04-13 10:37               ` cinap_lenrek
2012-04-13 12:45                 ` Charles Forsyth
2012-04-13 10:49                   ` cinap_lenrek

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=0198089a28f684163b621d0d75178ed2@rei2.9hal \
    --to=cinap_lenrek@gmx.de \
    --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).