The R Project SVN R

Rev

Rev 36821 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36821 Rev 37364
Line 73... Line 73...
73
  warning("libpng: %s",(char *) msg);
73
  warning("libpng: %s",(char *) msg);
74
}
74
}
75
 
75
 
76
#define CN (100.0/2.54)
76
#define CN (100.0/2.54)
77
 
77
 
-
 
78
__declspec(dllexport)
78
int R_SaveAsPng(void  *d, int width, int height, 
79
int R_SaveAsPng(void  *d, int width, int height, 
79
		unsigned long (*gp)(void *, int, int),
80
		unsigned long (*gp)(void *, int, int),
80
		int bgr, FILE *fp, unsigned int transparent, int res) 
81
		int bgr, FILE *fp, unsigned int transparent, int res) 
81
{
82
{
82
  png_structp png_ptr;
83
  png_structp png_ptr;
Line 281... Line 282...
281
  R_ShowMessage(buffer);
282
  R_ShowMessage(buffer);
282
}
283
}
283
 
284
 
284
 
285
 
285
 
286
 
-
 
287
__declspec(dllexport)
286
int R_SaveAsJpeg(void  *d, int width, int height, 
288
int R_SaveAsJpeg(void  *d, int width, int height, 
287
		unsigned long (*gp)(void *, int, int),
289
		unsigned long (*gp)(void *, int, int),
288
		int bgr, int quality, FILE *outfile, int res) 
290
		int bgr, int quality, FILE *outfile, int res) 
289
{
291
{
290
  struct jpeg_compress_struct cinfo;
292
  struct jpeg_compress_struct cinfo;
Line 384... Line 386...
384
#define BMPDW(a) {dwrd=a;if(fwrite(&dwrd,sizeof(unsigned long),1,fp)!=1) BMPERROR}
386
#define BMPDW(a) {dwrd=a;if(fwrite(&dwrd,sizeof(unsigned long),1,fp)!=1) BMPERROR}
385
#define BMPLONG(a) {lng=a;if(fwrite(&lng,sizeof(long),1,fp)!=1) BMPERROR}
387
#define BMPLONG(a) {lng=a;if(fwrite(&lng,sizeof(long),1,fp)!=1) BMPERROR}
386
#define BMPPUTC(a) if(fputc(a,fp)==EOF) BMPERROR;
388
#define BMPPUTC(a) if(fputc(a,fp)==EOF) BMPERROR;
387
#define HEADERSIZE 54
389
#define HEADERSIZE 54
388
 
390
 
-
 
391
__declspec(dllexport)
389
int R_SaveAsBmp(void  *d, int width, int height, 
392
int R_SaveAsBmp(void  *d, int width, int height, 
390
		unsigned long (*gp)(void *, int, int), int bgr, FILE *fp,
393
		unsigned long (*gp)(void *, int, int), int bgr, FILE *fp,
391
		int res) 
394
		int res) 
392
{
395
{
393
  unsigned long  col, palette[256];
396
  unsigned long  col, palette[256];