added bp_ratio field
implemented ratio logic for retina support
added ratio output to the templates