9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <russcox@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] point2rgb and point2rgba
Date: Mon, 31 Jan 2005 13:01:32 -0500	[thread overview]
Message-ID: <ee9e417a050131100179bb8610@mail.gmail.com> (raw)
In-Reply-To: <673bb0f7f7be8c76f1db56fb175f06a9@plan9.ucalgary.ca>

> here are the prototypes:
> 
> point2rgb(Image *, Point, uchar *r, uchar *g, uchar *b)
> point2rgb(Image *, Point, uchar *r, uchar *g, uchar *b, uchar *alpha)
> 
> s/uchar/int/ if you think it's better...

i'd just make it

ulong point2rgba(Image*, Point)

but i question the utility.  if you want just one
pixel, fine, but how often does that happen?
you probably want many pixels, in which case
you should use unloadimage anyway.

each call to point2rgba would have to do
multiple 9p transactions with the draw server.
for anything that processes an entire image,
unloadimage is the right way to go.

russ


  parent reply	other threads:[~2005-01-31 18:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-31 14:54 andrey mirtchovski
2005-01-31 15:01 ` andrey mirtchovski
2005-01-31 18:01 ` Russ Cox [this message]
2005-01-31 18:23   ` andrey mirtchovski
2005-01-31 18:26     ` Russ Cox
2005-01-31 18:46       ` rog
2005-01-31 18:47         ` andrey mirtchovski
2005-01-31 18:57           ` Russ Cox
2005-01-31 19:14             ` andrey mirtchovski
2005-01-31 19:19             ` rog
2005-01-31 19:33               ` andrey mirtchovski
2005-01-31 19:37               ` Joel Salomon
2005-01-31 19:48                 ` andrey mirtchovski
2005-01-31 20:27                 ` rog

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=ee9e417a050131100179bb8610@mail.gmail.com \
    --to=russcox@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).