The R Project SVN R

Rev

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

Rev 6459 Rev 6644
Line 17... Line 17...
17
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 */
18
 */
19
 
19
 
20
 
20
 
21
/* 
21
/* 
22
 * This file aims to be system independent so it sees the underline
22
 * This file aims to be system independent so it sees the underlying
23
 * structures only using:
23
 * structures only using:
24
 * void *d : an 'opaque' view of the source of the pixels;
24
 * void *d : an 'opaque' view of the source of the pixels;
25
 * int width, height: dimensions in pixels;
25
 * int width, height: dimensions in pixels;
26
 * unsigned long (*gp)(void *d, int x, int y): a function which
26
 * unsigned long (*gp)(void *d, int x, int y): a function which
27
 *     returns the colour of the (x,y) pixels stored either as
27
 *     returns the colour of the (x,y) pixels stored either as
Line 108... Line 108...
108
    png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);
108
    png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);
109
    return 0;
109
    return 0;
110
  }
110
  }
111
  
111
  
112
  /* Set error handling.  REQUIRED if you aren't supplying your own
112
  /* Set error handling.  REQUIRED if you aren't supplying your own
113
   * error hadnling functions in the png_create_write_struct() call.
113
   * error handling functions in the png_create_write_struct() call.
114
   */
114
   */
115
  if (setjmp(png_ptr->jmpbuf)) {
115
  if (setjmp(png_ptr->jmpbuf)) {
116
    /* If we get here, we had a problem writing the file */
116
    /* If we get here, we had a problem writing the file */
117
    free(scanline);
117
    free(scanline);
118
    png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);
118
    png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);