Make gallery magnification factor generic.