The R Project SVN R

Rev

Rev 44570 | Rev 44594 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 44570 Rev 44580
Line 116... Line 116...
116
     * error handling functions in the png_create_write_struct() call.
116
     * error handling functions in the png_create_write_struct() call.
117
     */
117
     */
118
    if (setjmp(png_ptr->jmpbuf)) {
118
    if (setjmp(png_ptr->jmpbuf)) {
119
	/* If we get here, we had a problem writing the file */
119
	/* If we get here, we had a problem writing the file */
120
	free(scanline);
120
	free(scanline);
121
	png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);
121
	png_destroy_write_struct(&png_ptr, &info_ptr);
122
	return 0;
122
	return 0;
123
    }
123
    }
124
    png_set_error_fn(png_ptr, NULL, my_png_error, my_png_warning);
124
    png_set_error_fn(png_ptr, NULL, my_png_error, my_png_warning);
125
 
125
 
126
    /* I/O initialization functions is REQUIRED */
126
    /* I/O initialization functions is REQUIRED */
Line 228... Line 228...
228
    /* It is REQUIRED to call this to finish writing the rest of the file */
228
    /* It is REQUIRED to call this to finish writing the rest of the file */
229
    png_write_end(png_ptr, info_ptr);
229
    png_write_end(png_ptr, info_ptr);
230
 
230
 
231
    /* clean up after the write, and free any memory allocated */
231
    /* clean up after the write, and free any memory allocated */
232
    free(scanline);
232
    free(scanline);
233
    png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
233
    png_destroy_write_struct(&png_ptr, &info_ptr);
234
 
234
 
235
    /* that's it */
235
    /* that's it */
236
    return 1;
236
    return 1;
237
}
237
}
238
 
238