todo: lossless webp input
This commit is contained in:
		
							parent
							
								
									d209608106
								
							
						
					
					
						commit
						4d097fdefb
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -12,7 +12,9 @@ async function main() { | ||||||
|         const file = path.parse(fileIn); |         const file = path.parse(fileIn); | ||||||
|         const fileOut = `${dirOut}/${file.name}.webp`; |         const fileOut = `${dirOut}/${file.name}.webp`; | ||||||
| 
 | 
 | ||||||
|  |         // TODO: what if the input image is already a lossless webp?
 | ||||||
|         const lossless = file.ext === '.png'; |         const lossless = file.ext === '.png'; | ||||||
|  |          | ||||||
|         const command = [ |         const command = [ | ||||||
|             `magick "${fileIn}"`, |             `magick "${fileIn}"`, | ||||||
|             `-define webp:lossless=${lossless}`, |             `-define webp:lossless=${lossless}`, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue