mirror of
				https://github.com/webmproject/libwebp.git
				synced 2025-10-31 02:15:42 +01:00 
			
		
		
		
	vwebp: remove the -fit option (and make it default)
BUG=webp:433 Change-Id: I18476ba0ada0184d4d9e94060d601002bfa006da
This commit is contained in:
		
							
								
								
									
										1
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								README
									
									
									
									
									
								
							| @@ -405,7 +405,6 @@ Options are: | ||||
|   -dither <int>  dithering strength (0..100), default=50 | ||||
|   -noalphadither disable alpha plane dithering | ||||
|   -usebgcolor .. display background color | ||||
|   -fit ......... downscale large images to preserve aspect ratio | ||||
|   -mt .......... use multi-threading | ||||
|   -info ........ print info | ||||
|   -h ........... this help message | ||||
|   | ||||
| @@ -72,7 +72,6 @@ static struct { | ||||
|   WebPIterator prev_frame; | ||||
|   WebPChunkIterator iccp; | ||||
|   int viewport_width, viewport_height; | ||||
|   int fit;  // if true, rescale large images to preserve aspect ratio. | ||||
| } kParams; | ||||
|  | ||||
| static void ClearPreviousPic(void) { | ||||
| @@ -431,7 +430,7 @@ static void StartDisplay(void) { | ||||
| #endif | ||||
|   screen_width = glutGet(GLUT_SCREEN_WIDTH); | ||||
|   screen_height = glutGet(GLUT_SCREEN_HEIGHT); | ||||
|   if ((width > screen_width || height > screen_height) && kParams.fit) { | ||||
|   if (width > screen_width || height > screen_height) { | ||||
|     if (width > screen_width) { | ||||
|       height = (height * screen_width + width - 1) / width; | ||||
|       width = screen_width; | ||||
| @@ -468,7 +467,6 @@ static void Help(void) { | ||||
|       "  -dither <int>  dithering strength (0..100), default=50\n" | ||||
|       "  -noalphadither disable alpha plane dithering\n" | ||||
|       "  -usebgcolor .. display background color\n" | ||||
|       "  -fit ......... downscale large images to preserve aspect ratio\n" | ||||
|       "  -mt .......... use multi-threading\n" | ||||
|       "  -info ........ print info\n" | ||||
|       "  -h ........... this help message\n" | ||||
| @@ -497,8 +495,6 @@ int main(int argc, char *argv[]) { | ||||
|   kParams.use_color_profile = 1; | ||||
|   // Background color hidden by default to see transparent areas. | ||||
|   kParams.draw_anim_background_color = 0; | ||||
|   // By default don't rescale too-large input images to preserve aspect ratio. | ||||
|   kParams.fit = 0; | ||||
|  | ||||
|   for (c = 1; c < argc; ++c) { | ||||
|     int parse_error = 0; | ||||
| @@ -515,8 +511,6 @@ int main(int argc, char *argv[]) { | ||||
|       config->options.alpha_dithering_strength = 0; | ||||
|     } else if (!strcmp(argv[c], "-usebgcolor")) { | ||||
|       kParams.draw_anim_background_color = 1; | ||||
|     } else if (!strcmp(argv[c], "-fit")) { | ||||
|       kParams.fit = 1; | ||||
|     } else if (!strcmp(argv[c], "-dither") && c + 1 < argc) { | ||||
|       config->options.dithering_strength = | ||||
|           ExUtilGetInt(argv[++c], 0, &parse_error); | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| .\"                                      Hey, EMACS: -*- nroff -*- | ||||
| .TH VWEBP 1 "May 28, 2019" | ||||
| .TH VWEBP 1 "June 5, 2019" | ||||
| .SH NAME | ||||
| vwebp \- decompress a WebP file and display it in a window | ||||
| .SH SYNOPSIS | ||||
| @@ -42,10 +42,6 @@ to smooth the gradients. This flag will prevent this dithering. | ||||
| Fill transparent areas with the bitstream's own background color instead of | ||||
| checkerboard only. Default is white for non-animated images. | ||||
| .TP | ||||
| .B \-fit | ||||
| If an image is larger than the display dimension, rescale it to preserve | ||||
| the aspect ratio. | ||||
| .TP | ||||
| .B \-mt | ||||
| Use multi-threading for decoding, if possible. | ||||
| .TP | ||||
|   | ||||
		Reference in New Issue
	
	Block a user