forked from luanti-org/minetest_game
		
	Safe texture compression (#2808)
Only a single program was used to safely compress all textures in MTG. * `optipng -o7 -zm1-9 -nc -strip all -clobber %%f` The key command used is -nc, which stops color mode changes. I.e. any RGBA textures will remain RGBA textures, with none being changes to 8-bit indexed mode. utils/optimize_textures.sh performs this compression automatically, assuming optipng is installed.
This commit is contained in:
		
							
								
								
									
										6
									
								
								utils/optimize_textures.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								utils/optimize_textures.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| # Colors with 0 alpha need to be preserved, because opaque leaves ignore alpha. | ||||
| # For that purpose, the use of indexed colors is disabled (-nc). | ||||
|  | ||||
| find -name '../*.png' -print0 | xargs -0 optipng -o7 -zm1-9 -nc -strip all -clobber | ||||
		Reference in New Issue
	
	Block a user