forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slow PNG encode? Memory stick issue?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
bulb



Joined: 19 Jan 2006
Posts: 50

PostPosted: Thu Jan 26, 2006 9:12 pm    Post subject: Reply with quote

patpsp,

I would advise against changing the libpng sources. Why? Because you would have to do that everytime the libpng would get updated. Not to mention every time check for the changes in library, so that file IO and memory management functions would not be used elsewhere.

It is better to register to WriteToFile callback (see png_set_write_fn), where you receive small encoded buffer that you could either write to file or copy to larger buffer that will be written to file when the time is right. I used the latter method and it works like a charm.

I would also advise against changing the CRT library sources.

In using this callback you have only less than an hour work and in case of new library release no maintenance whatsoever. On the other hand, you will spend the same amount of time to change the sources and a life time maintenance work.

Don't do more than needed. Good programmer is lazy programmer. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group