transform image to vector