build/lib/lottie_animation_manager/__main__.py
def compress_image(file_name):
	'''
		Compress a local PNG or JPEG image using the TinyPNG API 
	'''
	global bucket
	global configured_tiny_png_key
	global compression_enabled

	import tinify
	tinify.key = configured_tiny_png_key

	click.echo(click.style('Compressing image files:',
				fg="green"),
				nl=True)
	try:
		original_file_size = sizeof_fmt(os.path.getsize(file_name))
		source = tinify.from_file(file_name)
		source.to_file(file_name)
		compressed_file_size = sizeof_fmt(os.path.getsize(file_name))
		click.echo(click.style('{} - Compression successful'.format(file_name),
						fg="bright_cyan"),
						nl=False)
		click.echo(click.style(' {} ➟ {} '.format(original_file_size, compressed_file_size),
						fg="blue"))
	except Exception as e:
		click.echo(click.style('{} - Error compressing this file'.format(file_name),
						fg="red"))

		Compress a local PNG or JPEG image using the TinyPNG API 
	
Compress a local PNG or JPEG image using the TinyPNG API
Compress a local PNG or JPEG image using the TinyPNG API
def compress_image(file_name):
	global bucket
	global configured_tiny_png_key
	global compression_enabled
	import tinify
	tinify.key = configured_tiny_png_key
	click.echo(click.style('Compressing image files:',
				fg="green"),
				nl=True)
	try:
		original_file_size = sizeof_fmt(os.path.getsize(file_name))
		source = tinify.from_file(file_name)
		source.to_file(file_name)
		compressed_file_size = sizeof_fmt(os.path.getsize(file_name))
		click.echo(click.style('{} - Compression successful'.format(file_name),
						fg="bright_cyan"),
						nl=False)
		click.echo(click.style(' {} ➟ {} '.format(original_file_size, compressed_file_size),
						fg="blue"))
	except Exception as e:
		click.echo(click.style('{} - Error compressing this file'.format(file_name),
						fg="red"))
def compress_image ( file_name ) : global bucket global configured_tiny_png_key global compression_enabled import tinify tinify . key = configured_tiny_png_key click . echo ( click . style ( 'Compressing image files:' , fg = "green" ) , nl = True ) try : original_file_size = sizeof_fmt ( os . path . getsize ( file_name ) ) source = tinify . from_file ( file_name ) source . to_file ( file_name ) compressed_file_size = sizeof_fmt ( os . path . getsize ( file_name ) ) click . echo ( click . style ( '{} - Compression successful' . format ( file_name ) , fg = "bright_cyan" ) , nl = False ) click . echo ( click . style ( ' {} ➟ {} '.f o rmat(o r iginal_file_size,  c mpressed_file_size), fg = "blue" ) ) except Exception as e : click . echo ( click . style ( '{} - Error compressing this file' . format ( file_name ) , fg = "red" ) )
Compress a local PNG or JPEG image using the TinyPNG API
Compress a local PNG or JPEG image using the TinyPNG API
'''
		Compress a local PNG or JPEG image using the TinyPNG API 
	'''
file_name