9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* RE: [9fans] PNG and APE
@ 2006-04-24  8:24 cej
  2006-04-25  5:09 ` lucio
  0 siblings, 1 reply; 11+ messages in thread
From: cej @ 2006-04-24  8:24 UTC (permalink / raw)
  To: 9fans

Thanks, good work!! However, we should try to do native ports for
libraries,
to encourage people to write native progs.

Best,
++pac.


-----Original Message-----
From: 9fans-bounces+cej=gli.cas.cz@cse.psu.edu
[mailto:9fans-bounces+cej=gli.cas.cz@cse.psu.edu] On Behalf Of
lucio@proxima.alt.za
Sent: 23 April 2006 18:52
To: 9fans@cse.psu.edu
Subject: [9fans] PNG and APE

I have added APE ports of the most recently released versions of ZLIB
and LIBPNG and a newer PNG renderer (npng.c) to
/n/sources/contrib/lucio/pub.  The README in the same directory
started off as a mail message to describe all the relevant facets of
this project, but it got too long.

I'd like to solicit comments and possibly draw on more advanced skills
to address some of the issues I raise in the README, for which I think
npng may be a worthwhile exchange, specially if we can repair its
present shortcomings as documented in the README :-)

++L



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [9fans] PNG and APE
  2006-04-24  8:24 [9fans] PNG and APE cej
@ 2006-04-25  5:09 ` lucio
  2006-04-25  5:20   ` Lyndon Nerenberg
  0 siblings, 1 reply; 11+ messages in thread
From: lucio @ 2006-04-25  5:09 UTC (permalink / raw)
  To: 9fans

> Thanks, good work!! However, we should try to do native ports for
> libraries,
> to encourage people to write native progs.

Thank you for the encouragement.  That's the plan, but it's a tough
call because tracking these libraries is a nightmare.  Actually not
really so with zlib, libpng and even libjpeg (my next effort), but
once you move a little higher up to the applications, it's quite a
problem.

Anybody who wants to contribute, here are the most difficult issues:
replacing stdio with Bio and error handling (setjump.longjump, is
it?).  I don't mind coding this, but I need some code inspection once
I'm done.  You'll see in npng that I've defined empty functions for
error handling and I use sysfatal()-style handling for errors that
oughtn't to bring the program to a standstill.

In addition, advice on the "t", "v" and "3" options would not go
amiss.  I think I have "k" right, but I use "v" where I think "t"
ought to be and "v" and "3" need just the type of hint that Russ is so
good at.

Lastly, can someone tell me for definite that "e" isn't required?

++L



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
  2006-04-25  5:09 ` lucio
@ 2006-04-25  5:20   ` Lyndon Nerenberg
  2006-04-25 18:02     ` lucio
  0 siblings, 1 reply; 11+ messages in thread
From: Lyndon Nerenberg @ 2006-04-25  5:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

 > That's the plan, but it's a tough
> call because tracking these libraries is a nightmare.  Actually not
> really so with zlib, libpng and even libjpeg (my next effort), but
> once you move a little higher up to the applications, it's quite a
> problem.

You don't have to track these utilities feechur for feechur.  You
don't even have to preserve the API, necessarily.  Not for native-to-
Plan9 implementations.  Take what's good and leave the crap behind.
(And make the good parts better, within the better environment.)

--lyndon


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
  2006-04-25  5:20   ` Lyndon Nerenberg
@ 2006-04-25 18:02     ` lucio
  0 siblings, 0 replies; 11+ messages in thread
From: lucio @ 2006-04-25 18:02 UTC (permalink / raw)
  To: 9fans

> You don't have to track these utilities feechur for feechur.  You
> don't even have to preserve the API, necessarily.  Not for native-to-
> Plan9 implementations.  Take what's good and leave the crap behind.
> (And make the good parts better, within the better environment.)

Well, if one had unlimited resources, that would be great, but with
Open Source it is often the case that it's not features but bug fixes
that come along thick and fast.  Rewriting a library is no small task,
tracking it when modified isn't much fun either.

That, I'm afraid, is Plan 9's "between a rock and a hard place".

++L



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
  2006-04-26  0:34 erik quanstrom
@ 2006-04-26  5:48 ` lucio
  0 siblings, 0 replies; 11+ messages in thread
From: lucio @ 2006-04-26  5:48 UTC (permalink / raw)
  To: 9fans

> a rewritten or from-scratch library can lead it's own life.  there's
> no requirement that said library needs to track anything.

It's still a "rock", otherwise we'd have an endless supply of improved
libraries to flaunt to our Oonix colleagues.

And re-inventing the wheel too seldom results in Porter-Duffs,
Fossil/Ventis or Factotums.  Most often the result looks like GCC.

++L



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
@ 2006-04-26  0:34 erik quanstrom
  2006-04-26  5:48 ` lucio
  0 siblings, 1 reply; 11+ messages in thread
From: erik quanstrom @ 2006-04-26  0:34 UTC (permalink / raw)
  To: 9fans

a rewritten or from-scratch library can lead it's own life.  there's
no requirement that said library needs to track anything.

- erik

On Tue Apr 25 14:26:19 CDT 2006, lucio@proxima.alt.za wrote:
>
> Well, if one had unlimited resources, that would be great, but with
> Open Source it is often the case that it's not features but bug fixes
> that come along thick and fast.  Rewriting a library is no small task,
> tracking it when modified isn't much fun either.
>
> That, I'm afraid, is Plan 9's "between a rock and a hard place".
>
> ++L
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
  2006-04-23 20:27     ` Charles Forsyth
@ 2006-04-23 21:05       ` Steve Simon
  0 siblings, 0 replies; 11+ messages in thread
From: Steve Simon @ 2006-04-23 21:05 UTC (permalink / raw)
  To: 9fans

> ftp://ftp.alvyray.com/Acrobat/4_Comp.pdf
> ftp://ftp.alvyray.com/Acrobat/17_Nonln.pdf

And the one that started it:
	http://www.keithp.com/~keithp/porterduff/p253-porter.pdf

-Steve


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
  2006-04-23 18:32   ` lucio
@ 2006-04-23 20:27     ` Charles Forsyth
  2006-04-23 21:05       ` Steve Simon
  0 siblings, 1 reply; 11+ messages in thread
From: Charles Forsyth @ 2006-04-23 20:27 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

for interesting discussions of that and several other matters, see
ftp://ftp.alvyray.com/Acrobat/4_Comp.pdf
ftp://ftp.alvyray.com/Acrobat/17_Nonln.pdf

[-- Attachment #2: Type: message/rfc822, Size: 2775 bytes --]

From: lucio@proxima.alt.za
To: 9fans@cse.psu.edu
Subject: Re: [9fans] PNG and APE
Date: Sun, 23 Apr 2006 20:32:37 +0200
Message-ID: <4a162f325b2077f65b44586f29ae5827@proxima.alt.za>

> There is a mismatch between
> PNGs definition of alpha and Plan 9's.

Wonderful, thank you.  I will fix!

++L

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
  2006-04-23 18:05 ` Russ Cox
@ 2006-04-23 18:32   ` lucio
  2006-04-23 20:27     ` Charles Forsyth
  0 siblings, 1 reply; 11+ messages in thread
From: lucio @ 2006-04-23 18:32 UTC (permalink / raw)
  To: 9fans

> There is a mismatch between
> PNGs definition of alpha and Plan 9's.

Wonderful, thank you.  I will fix!

++L



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] PNG and APE
  2006-04-23 16:51 lucio
@ 2006-04-23 18:05 ` Russ Cox
  2006-04-23 18:32   ` lucio
  0 siblings, 1 reply; 11+ messages in thread
From: Russ Cox @ 2006-04-23 18:05 UTC (permalink / raw)
  To: 9fans

I did not internalize the fact that your confusion over the
meaning of alpha arose from trying to process alpha
channels in PNG files.  There is a mismatch between
PNGs definition of alpha and Plan 9's.  In Plan 9 images,
the r, g, and b channels are premultiplied by alpha.
In PNG, they are not, so when you display a PNG image
with alpha channel you must do (r, g, b) *= alpha yourself
before handing it off to libdraw.

Russ



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] PNG and APE
@ 2006-04-23 16:51 lucio
  2006-04-23 18:05 ` Russ Cox
  0 siblings, 1 reply; 11+ messages in thread
From: lucio @ 2006-04-23 16:51 UTC (permalink / raw)
  To: 9fans

I have added APE ports of the most recently released versions of ZLIB
and LIBPNG and a newer PNG renderer (npng.c) to
/n/sources/contrib/lucio/pub.  The README in the same directory
started off as a mail message to describe all the relevant facets of
this project, but it got too long.

I'd like to solicit comments and possibly draw on more advanced skills
to address some of the issues I raise in the README, for which I think
npng may be a worthwhile exchange, specially if we can repair its
present shortcomings as documented in the README :-)

++L



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-04-26  5:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-24  8:24 [9fans] PNG and APE cej
2006-04-25  5:09 ` lucio
2006-04-25  5:20   ` Lyndon Nerenberg
2006-04-25 18:02     ` lucio
  -- strict thread matches above, loose matches on Subject: below --
2006-04-26  0:34 erik quanstrom
2006-04-26  5:48 ` lucio
2006-04-23 16:51 lucio
2006-04-23 18:05 ` Russ Cox
2006-04-23 18:32   ` lucio
2006-04-23 20:27     ` Charles Forsyth
2006-04-23 21:05       ` Steve Simon

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).