git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compile readers/swf.c into readers/swf2.o
[swftools.git]
/
lib
/
png.c
diff --git
a/lib/png.c
b/lib/png.c
index
739b895
..
95f5b11
100644
(file)
--- a/
lib/png.c
+++ b/
lib/png.c
@@
-99,7
+99,7
@@
static int png_read_header(FILE*fi, struct png_header*header)
unsigned char*data;
fread(head2,8,1,fi);
if(strncmp((const char*)head,(const char*)head2,4))
unsigned char*data;
fread(head2,8,1,fi);
if(strncmp((const char*)head,(const char*)head2,4))
- return 0;
+ return 0; // not a png file
while(png_read_chunk(&id, &len, &data, fi))
{
while(png_read_chunk(&id, &len, &data, fi))
{
@@
-448,7
+448,6
@@
EXPORT int getPNGdimensions(const char*sname, int*destwidth, int*destheight)
return 0;
}
if(!png_read_header(fi, &header)) {
return 0;
}
if(!png_read_header(fi, &header)) {
- fprintf(stderr, "Error reading header from file %s\n", sname);
return 0;
}
return 0;
}
@@
-485,7
+484,6
@@
EXPORT int getPNG(const char*sname, int*destwidth, int*destheight, unsigned char
}
if(!png_read_header(fi, &header)) {
}
if(!png_read_header(fi, &header)) {
- printf("Error reading header from file %s\n", sname);
return 0;
}
return 0;
}