Imported from libpng-1.0.9beta1.tar

This commit is contained in:
Glenn Randers-Pehrson
2000-11-10 12:26:19 -06:00
parent 32fc5ceb91
commit 5e5c1e1f56
71 changed files with 6731 additions and 4008 deletions

View File

@@ -45,9 +45,9 @@ $ call make pnm2png.exe -
$ write sys$output "Building png2pnm..."
$ CALL MAKE png2pnm.OBJ "cc ''CCOPT' png2pnm" -
png2pnm.c
$ call make pnm2png.exe -
"LINK pnm2png,lib.opt/opt" -
pnm2png.obj
$ call make png2pnm.exe -
"LINK png2pnm,lib.opt/opt" -
png2pnm.obj
$ exit
$!
$!

View File

@@ -204,6 +204,7 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
int row, col;
int ret;
int i;
long dep_16;
/* read and check signature in PNG file */
ret = fread (buf, 1, 8, png_file);
@@ -379,8 +380,10 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
if (raw)
fputc ((int) *pix_ptr++ , pnm_file);
else
if (bit_depth == 16)
fprintf (pnm_file, "%ld ", ((long) *pix_ptr++ << 8) + (long) *pix_ptr++);
if (bit_depth == 16){
dep_16 = (long) *pix_ptr++;
fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++));
}
else
fprintf (pnm_file, "%ld ", (long) *pix_ptr++);
}
@@ -397,8 +400,10 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
if (raw)
fputc ((int) *pix_ptr++ , alpha_file);
else
if (bit_depth == 16)
fprintf (alpha_file, "%ld ", ((long) *pix_ptr++ << 8) + (long) *pix_ptr++);
if (bit_depth == 16){
dep_16 = (long) *pix_ptr++;
fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++);
}
else
fprintf (alpha_file, "%ld ", (long) *pix_ptr++);
}