Pasting part of a conversation with clone2727:<div><br></div><div><div>[22:05] <[md5]> ...what is the problem with our own PNG code? honestly :/</div><div>[22:05] <[md5]> it's not that it's huge or anything</div>
<div>[22:05] <clone2727> Because it's not needed. It's more code to maintain. We would be at fault for bugs, etc etc etc</div><div>[22:05] <[md5]> it's about 350 lines</div><div>[22:05] <[md5]> JPEG is much bigger</div>
<div>[22:06] <[md5]> and it's working (I'm playing through the game now)</div><div>[22:06] <clone2727> Using JPEG as an argument is not good. I was a big advocate of using libjpeg</div><div>[22:06] <clone2727> It's API is just terrible</div>
<div>[22:06] <clone2727> Its*</div><div>[22:06] <[md5]> but we're introducing needed libraries for no reason</div><div>[22:06] <[md5]> plus, we don't know what libpng is doing in all platforms</div>
<div>[22:06] <clone2727> What do you mean?</div><div>[22:08] <[md5]> i.e. is it working for all platforms? how much memory does it need?</div><div>[22:08] <[md5]> (and I mean exotic platforms)</div><div>
[22:08] <[md5]> I know it's working in desktop OSes</div><div>[22:08] <clone2727> I'm pretty sure libpng is exactly the same on all platforms</div><div>[22:08] <clone2727> It's not a program that uses system functions</div>
<div>[22:08] <[md5]> but we don't need all of libpng for our purposes</div><div>[22:08] <clone2727> It's just a PNG decoder</div><div>[22:09] <[md5]> I consider less dependencies a good thing</div>
<div>[22:09] <clone2727> I don't</div><div>[22:09] <[md5]> i.e. less dependencies on other peoples' code</div><div>[22:09] <clone2727> Why reinvent the wheel when it's not necessary?</div><div>
[22:10] <[md5]> but as you said, it's just a PNG decoder, and the code I got is working - plus, I got it from another library, which, itself is working</div><div>[22:10] <[md5]> and there's a spec for it, it's not a RE effort</div>
<div><br></div><div>To sum up: honestly, if you guys believe that this code is unnecessary, that's fine</div><div>with me (we got 3 votes so far: Willem, Matthew and Johannes). We can remove it</div><div>if you want to, but I don't see the point. I personally did what I aimed for: to understand</div>
<div>the PNG format and write a decoder for it, based on specs and other publically</div><div>available code. So I personally gained something from it, but if it's not needed for the</div><div>project, we can stick with libpng.</div>
<div><br></div><div>Regards</div><div>Filippos</div><div><br></div><div class="gmail_quote">On Wed, Feb 2, 2011 at 10:04 PM, Matthew Hoops <span dir="ltr"><<a href="mailto:clone2727@gmail.com">clone2727@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wed, Feb 2, 2011 at 2:59 PM, Filippos Karapetis <<a href="mailto:bluegr@gmail.com">bluegr@gmail.com</a>> wrote:<br>

> Actually, the problem with libpng is that it's a required library. i.e. if<br>
> we sit back and<br>
> think which are the bare-bones necessary libraries for compiling ScummVM,<br>
> it's<br>
> just libsdl... and nothing else. libmad, libogg, libflac and libtheora are<br>
> all optional.<br>
> If they're not included, a feature is missing. But libpng is the only<br>
> exception here: it<br>
> is required in order to play Broken Sword 2.5.<br>
</div>Doesn't sword25 require libvorbis and/or libtremor for audio? I would<br>
consider that required. Riven DVD requires libmad to get audio as<br>
well, so it's pretty much required in order to play it.<br>
<div class="im"><br>
> The usage of libpng in this case lies in the same category as libjpeg in<br>
> mohawk,<br>
> which makes extensive usage of JPEGs. But with mohawk we rolled our own JPEG<br>
> reader<br>
</div>Not true, the JPEG decoder was written by jvprat and ST for use with<br>
Groovie's ROQ decoder.<br>
<br>
-Matt<br>
</blockquote></div><br><br clear="all"><br>-- <br>"Experience is the name every one gives to their mistakes" - Oscar Wilde <br>
</div>