PNG

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

It's a bot in case you didn't notice :)
Guest

Post by Guest »

>_>
<_<
-_-

grrrr, stupid bot
rofl

i've seen the ones that go on about their hobbies, this is a new one for me. i figured it was wierd, but i assumed it was just another rude guy :D
zola -

Post by zola - »

patch for png loader so the FILE pointer is no more needed.

change to user_read_data_fcn as followed:

Code: Select all

// PNG function for file reading
void user_read_data_fcn(png_structp png_ptr,png_bytep data, png_size_t length)
{
   png_size_t check;

   // changed by zola {
   irr::io::IReadFile* file=(irr::io::IReadFile*)png_ptr->io_ptr;
   check=(png_size_t) file->read((void*)data,length);
   // }

   if (check != length) png_error(png_ptr, "Read Error");
}
change in ::loadImage

Code: Select all

...
try{
...
png_set_read_fn(png_ptr,file, user_read_data_fcn);
}
find the png loader also included in the CVS in the next few days.

Thank You RT for the code.
rt
Posts: 150
Joined: Sun Nov 30, 2003 6:54 am
Location: canada
Contact:

Post by rt »

you're welcome :) i'm glad someone finds it useful.. PNG rules!
db
Posts: 1
Joined: Thu Dec 09, 2004 5:30 pm

Well done

Post by db »

I just finished integrating the PNG capabilities into 0.7.1 and everything is working fine! Thanks so much for this. Our project is using PNG textures in 3DS files and we were getting textureless objects until I rebuilt the DLL, then everything just worked. I do have a question though:

I had to include not only libpng.dll but also zlib.dll -- is that normal? I read earlier in the post that I could just link libs directly using the .a files -- what changes do I need to make in my build settings in Visual Studio to do that?

Thanks again. We are really looking forward to using Irrlicht for our project.
Stef007g

png loader class

Post by Stef007g »

I totally agree with the fact that PNG is a great format :wink:, it's nearly the only one we used at work.
Is it possible to have a link to the CImageLoaderPng class?
Many thanks,
Stef, a new IrrLicht user.
Post Reply