Add Alpha Encode support from WebPEncode.
Extend WebP Encode functionality to encode Alpha data and produce bit-stream (RIFF+VP8X+ALPH+VP8) corresponding to WebP-Alpha. Change-Id: I983b4cd97be94a86a8e6d03b3b9c728db851bf48
This commit is contained in:
		@@ -41,8 +41,9 @@ int WebPConfigInitInternal(WebPConfig* const config,
 | 
			
		||||
  config->show_compressed = 0;
 | 
			
		||||
  config->preprocessing = 0;
 | 
			
		||||
  config->autofilter = 0;
 | 
			
		||||
  config->alpha_compression = 0;
 | 
			
		||||
  config->partition_limit = 0;
 | 
			
		||||
  config->alpha_compression = 1;
 | 
			
		||||
  config->alpha_quality = 100;
 | 
			
		||||
 | 
			
		||||
  // TODO(skal): tune.
 | 
			
		||||
  switch (preset) {
 | 
			
		||||
@@ -111,6 +112,8 @@ int WebPValidateConfig(const WebPConfig* const config) {
 | 
			
		||||
    return 0;
 | 
			
		||||
  if (config->alpha_compression < 0)
 | 
			
		||||
    return 0;
 | 
			
		||||
  if (config->alpha_quality < 0 || config->alpha_quality > 100)
 | 
			
		||||
      return 0;
 | 
			
		||||
  return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user