AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

标签: ,

正在查看 0 条回复
  • 作者
    帖子
    • TomyTang - WirelessLink社区TomyTang
      参与者
      #1577
      Up
      12
      ::

      python运行错误

      Traceback (most recent call last):
      File "<module1>", line 19, in <module>
      AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

      Fixed:

      ANTIALIAS was removed in Pillow 10.0.0 (after being deprecated through many previous versions). Now you need to use PIL.Image.LANCZOS or PIL.Image.Resampling.LANCZOS.
      
      (This is the exact same algorithm that ANTIALIAS referred to, you just can no longer access it through the name ANTIALIAS.)

       

       

      访问ChatGPT的可用VPS机房IP推荐 Lisahost美国原生IP搬瓦工美西DMITTripodcloudFrantech
正在查看 0 条回复
  • 哎呀,回复话题必需登录。
WirelessLink社区
Logo