diff --git a/src/pdfapp.c b/src/pdfapp.c index 4b2de6b3f..76890d58c 100644 --- a/src/pdfapp.c +++ b/src/pdfapp.c @@ -31,6 +31,16 @@ * Image processing operations on multiple images followed by wrapping * them into a pdf. * + * There are two possible ways to specify the set of images: + * (1) an array of pathnames + * (2) a directory, typically with an additional pattern for selection. + * We use (1) because it is both simpler and more general. + * + * Corresponding to each function here is: + * (1) the image processing function that is carried out on each image + * (2) a program in prog that extracts images from a pdf and calls this + * function with an array of their pathnames. + * * |=============================================================| * | Important notes | * |=============================================================| diff --git a/src/tiffio.c b/src/tiffio.c index 0bbac8310..7af6e11f3 100644 --- a/src/tiffio.c +++ b/src/tiffio.c @@ -104,15 +104,14 @@ * * The exception is the old-style jpeg tiff format (OJPEG), which * is not supported. * * We support two formats requiring external libraries: ZIP and JPEG - * Both libz and libjpeg are required. + * All computers should have the zip library. * * At present we do not support WEBP in tiff, which uses * libwebp and was added in tifflib 4.1.0 in 2019. - * Note 3: On Windows with 2 bpp or 4 bpp images, the bytes in the - * tiff-compressed file depend on the pad bits, but not on the - * decoded raster image when read. Because it is sometimes - * convenient to use a golden file with a byte-by-byte check - * to verify invariance, we set the pad bits to 0 before writing, - * in pixWriteToTiffStream(). + * Note 3: We set the pad bits to 0 before writing in pixWriteToTiffStream(). + * Although they don't affect the raster image after decompression, + * it is sometimes convenient to use a golden file with a + * byte-by-byte check to verify invariance. The issue came up + * on Windows for 2 and 4 bpp images. * */ diff --git a/src/webpanimio.c b/src/webpanimio.c index a2ffbac00..da2e53bd7 100644 --- a/src/webpanimio.c +++ b/src/webpanimio.c @@ -204,8 +204,7 @@ WebPPicture frame; return ERROR_INT("cannot initialize WebP config", __func__, 1); config.lossless = lossless; config.quality = quality; - enc = WebPAnimEncoderNew(w, h, &enc_options); - if (enc == NULL) + if ((enc = WebPAnimEncoderNew(w, h, &enc_options)) == NULL) return ERROR_INT("cannot create WebP encoder", __func__, 1); for (i = 0; i < n; i++) { @@ -239,16 +238,17 @@ WebPPicture frame; return ERROR_INT("cannot add frame to animation", __func__, 1); } } - /* add a blank frame */ + /* Add a blank frame */ if (!WebPAnimEncoderAdd(enc, NULL, duration * i, NULL)) { - WebPAnimEncoderDelete(enc); - return ERROR_INT("cannot add blank frame to animation", __func__, 1); + WebPAnimEncoderDelete(enc); + return ERROR_INT("blank frame not added to animation", __func__, 1); } - /* encode the data */ + + /* Encode the data */ ret_webp = WebPAnimEncoderAssemble(enc, &webp_data); WebPAnimEncoderDelete(enc); if (!ret_webp) - return ERROR_INT("cannot assemble animation", __func__, 1); + return ERROR_INT("cannot assemble animation", __func__, 1); /* Set the loopcount if requested. Note that when you make a mux, * it imports the webp_data that was previously made, including