A fast chaos-based image encryption scheme with a dynamic state variables selection mechanism