The licensing agreement with the image-generation startup Midjourney marks a new element of its artificial intelligence strategy. The deal will…