Ticket #34408: molmol-png.diff
File molmol-png.diff, 903 bytes (added by howarth@…, 13 years ago) |
---|
-
src/motogl/MotOGLDump.c
old new 248 248 pngErrHand(png_structp pngStrucP, char *errMsg) 249 249 { 250 250 IORaiseError(errMsg); 251 longjmp(png StrucP->jmpbuf, 1);251 longjmp(png_jmpbuf(pngStrucP), 1); 252 252 } 253 253 #endif 254 254 … … 357 357 return IO_RES_ERR; 358 358 } 359 359 360 if (setjmp(png StrucP->jmpbuf)) {360 if (setjmp(png_jmpbuf(pngStrucP))) { 361 361 if (cBuf != NULL) 362 362 free(cBuf); 363 363 if (fBuf != NULL) … … 368 368 369 369 png_init_io(pngStrucP, ImgFileP); 370 370 371 pngInfoP->width = imgW; 372 pngInfoP->height = imgH; 373 pngInfoP->bit_depth = 8; 374 pngInfoP->color_type = PNG_COLOR_TYPE_RGB; 371 png_set_IHDR(pngStrucP, pngInfoP, imgW, imgH, 8, PNG_COLOR_TYPE_RGB, 0, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); 375 372 png_write_info(pngStrucP, pngInfoP); 376 373 } 377 374 #endif