From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 31 Jan 2005 13:01:32 -0500 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] point2rgb and point2rgba In-Reply-To: <673bb0f7f7be8c76f1db56fb175f06a9@plan9.ucalgary.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <673bb0f7f7be8c76f1db56fb175f06a9@plan9.ucalgary.ca> Topicbox-Message-UUID: 3a21373c-eace-11e9-9e20-41e7f4b1d025 > 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