mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 02:15:42 +01:00 
			
		
		
		
	Log warning for unsupported options for lossless.
Change-Id: I30d4e775959c7a4a8f5b649c8c90a4edb8cced47
This commit is contained in:
		| @@ -959,6 +959,23 @@ int main(int argc, const char *argv[]) { | ||||
|     goto Error; | ||||
|   } | ||||
|  | ||||
|   // Check for unsupported command line options for lossless mode and log | ||||
|   // warning for such options. | ||||
|   if (config.lossless == 1) { | ||||
|     if (config.target_size > 0 || config.target_PSNR > 0) { | ||||
|       fprintf(stderr, "Encoding for specified size or PSNR is not supported" | ||||
|                       " for lossless encoding. Ignoring such option(s)!\n"); | ||||
|     } | ||||
|     if (config.partition_limit > 0) { | ||||
|       fprintf(stderr, "Partition limit option is not required for lossless" | ||||
|                       " encoding. Ignoring this option!\n"); | ||||
|     } | ||||
|     if (show_progress) { | ||||
|       fprintf(stderr, "Progress reporting option is not supported for lossless" | ||||
|                       " encoding. Ignoring this option!\n"); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   if (!WebPValidateConfig(&config)) { | ||||
|     fprintf(stderr, "Error! Invalid configuration.\n"); | ||||
|     goto Error; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user