Faster cropping using UInt8Array instead of slow javascript Array.