return hash for image input