Ticket #28089: patch-imageIO.cpp.diff
File patch-imageIO.cpp.diff, 1.3 KB (added by ak.ml@…, 14 years ago) |
---|
-
fract4d/c/imageIO.cpp
old new 119 119 info_ptr = png_create_info_struct(png_ptr); 120 120 if(NULL == info_ptr) 121 121 { 122 png_destroy_write_struct(&png_ptr, png_infopp_NULL);122 png_destroy_write_struct(&png_ptr, NULL); 123 123 return; 124 124 } 125 125 … … 312 312 info_ptr = png_create_info_struct(png_ptr); 313 313 if (info_ptr == NULL) 314 314 { 315 png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);315 png_destroy_read_struct(&png_ptr, NULL, NULL); 316 316 return; 317 317 } 318 318 … … 325 325 //printf("shutdown\n"); 326 326 if(ok) 327 327 { 328 png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);328 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 329 329 } 330 330 } 331 331 … … 351 351 352 352 //printf("get IHDR\n"); 353 353 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 354 &interlace_type, int_p_NULL, int_p_NULL);354 &interlace_type, NULL, NULL); 355 355 356 356 //printf("set res(%d,%d)\n",width,height); 357 357 if(!im->set_resolution(width, height, -1, -1)) … … 372 372 for (int y = 0; y < im->Yres(); y++) 373 373 { 374 374 png_bytep row = (png_bytep)(im->getBuffer() + im->row_length() * y); 375 png_read_rows(png_ptr, &row, png_bytepp_NULL, 1);375 png_read_rows(png_ptr, &row, NULL, 1); 376 376 } 377 377 } 378 378 return true;