[Scummvm-devel] Moving and merging image-related code

Filippos Karapetis bluegr at gmail.com
Wed Feb 2 21:22:51 CET 2011


Pasting part of a conversation with clone2727:

[22:05] <[md5]> ...what is the problem with our own PNG code? honestly :/
[22:05] <[md5]> it's not that it's huge or anything
[22:05] <clone2727> Because it's not needed. It's more code to maintain. We
would be at fault for bugs, etc etc etc
[22:05] <[md5]> it's about 350 lines
[22:05] <[md5]> JPEG is much bigger
[22:06] <[md5]> and it's working (I'm playing through the game now)
[22:06] <clone2727> Using JPEG as an argument is not good. I was a big
advocate of using libjpeg
[22:06] <clone2727> It's API is just terrible
[22:06] <clone2727> Its*
[22:06] <[md5]> but we're introducing needed libraries for no reason
[22:06] <[md5]> plus, we don't know what libpng is doing in all platforms
[22:06] <clone2727> What do you mean?
[22:08] <[md5]> i.e. is it working for all platforms? how much memory does
it need?
[22:08] <[md5]> (and I mean exotic platforms)
[22:08] <[md5]> I know it's working in desktop OSes
[22:08] <clone2727> I'm pretty sure libpng is exactly the same on all
platforms
[22:08] <clone2727> It's not a program that uses system functions
[22:08] <[md5]> but we don't need all of libpng for our purposes
[22:08] <clone2727> It's just a PNG decoder
[22:09] <[md5]> I consider less dependencies a good thing
[22:09] <clone2727> I don't
[22:09] <[md5]> i.e. less dependencies on other peoples' code
[22:09] <clone2727> Why reinvent the wheel when it's not necessary?
[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
[22:10] <[md5]> and there's a spec for it, it's not a RE effort

To sum up: honestly, if you guys believe that this code is unnecessary,
that's fine
with me (we got 3 votes so far: Willem, Matthew and Johannes). We can remove
it
if you want to, but I don't see the point. I personally did what I aimed
for: to understand
the PNG format and write a decoder for it, based on specs and other
publically
available code. So I personally gained something from it, but if it's not
needed for the
project, we can stick with libpng.

Regards
Filippos

On Wed, Feb 2, 2011 at 10:04 PM, Matthew Hoops <clone2727 at gmail.com> wrote:

> On Wed, Feb 2, 2011 at 2:59 PM, Filippos Karapetis <bluegr at gmail.com>
> wrote:
> > Actually, the problem with libpng is that it's a required library. i.e.
> if
> > we sit back and
> > think which are the bare-bones necessary libraries for compiling ScummVM,
> > it's
> > just libsdl... and nothing else. libmad, libogg, libflac and libtheora
> are
> > all optional.
> > If they're not included, a feature is missing. But libpng is the only
> > exception here: it
> > is required in order to play Broken Sword 2.5.
> Doesn't sword25 require libvorbis and/or libtremor for audio? I would
> consider that required. Riven DVD requires libmad to get audio as
> well, so it's pretty much required in order to play it.
>
> > The usage of libpng in this case lies in the same category as libjpeg in
> > mohawk,
> > which makes extensive usage of JPEGs. But with mohawk we rolled our own
> JPEG
> > reader
> Not true, the JPEG decoder was written by jvprat and ST for use with
> Groovie's ROQ decoder.
>
> -Matt
>



-- 
"Experience is the name every one gives to their mistakes" - Oscar Wilde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20110202/584ab9db/attachment.html>


More information about the Scummvm-devel mailing list