Hi @ZH Chan ,
I suggest you change an image or check the pixels of the image, because I downloaded a random image and tested the code you shared and there was no obvious anti-aliasing. The result is as follows:
Best regards,
Elya
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.