PNG
patch for png loader so the FILE pointer is no more needed.
change to user_read_data_fcn as followed:
change in ::loadImage
find the png loader also included in the CVS in the next few days.
Thank You RT for the code.
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");
}
Code: Select all
...
try{
...
png_set_read_fn(png_ptr,file, user_read_data_fcn);
}
Thank You RT for the code.
Well done
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.
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.
png loader class
I totally agree with the fact that PNG is a great format , 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.
Is it possible to have a link to the CImageLoaderPng class?
Many thanks,
Stef, a new IrrLicht user.