ext/webp_ffi/util.c in webp-ffi-0.1.1 vs ext/webp_ffi/util.c in webp-ffi-0.1.2

- old
+ new

@@ -265,11 +265,11 @@ uint32* raster; int ok = 0; int dircount = 1; if (tif == NULL) { - fprintf(stderr, "Error! Cannot open TIFF file '%s'\n", filename); + //fprintf(stderr, "Error! Cannot open TIFF file '%s'\n", filename); return 0; } while (TIFFReadDirectory(tif)) ++dircount; @@ -296,11 +296,11 @@ ? WebPPictureImportRGBA(pic, (const uint8_t*)raster, stride) : WebPPictureImportRGBX(pic, (const uint8_t*)raster, stride); } _TIFFfree(raster); } else { - fprintf(stderr, "Error allocating TIFF RGBA memory!\n"); + //fprintf(stderr, "Error allocating TIFF RGBA memory!\n"); } if (ok && keep_alpha == 2) { WebPCleanupTransparentArea(pic); } @@ -333,11 +333,11 @@ int UtilReadPicture(const char* const filename, WebPPicture* const pic, int keep_alpha) { int ok = 0; FILE* in_file = fopen(filename, "rb"); if (in_file == NULL) { - fprintf(stderr, "Error! Cannot open input file '%s'\n", filename); + //fprintf(stderr, "Error! Cannot open input file '%s'\n", filename); return ok; } if (pic->width == 0 || pic->height == 0) { // If no size specified, try to decode it as PNG/JPEG (as appropriate). @@ -351,13 +351,10 @@ } } else { // If image size is specified, infer it as YUV format. ok = UtilReadYUV(in_file, pic); } - if (!ok) { - fprintf(stderr, "Error! Could not process file %s\n", filename); - } fclose(in_file); return ok; } @@ -367,10 +364,10 @@ int ok = 1; fout = fopen(out_file, "wb"); if (!fout) { fprintf(stderr, "Error opening output file %s\n", out_file); - return; + return 0; } if (format == PNG) { ok &= UtilWritePNG(fout, buffer); }