[Bug 1003302] [NEW] AttributeError: getmask from in ImageDraw.py called from ImageDraw2.text()

Rick Spencer 1003302 at bugs.launchpad.net
Wed May 23 08:49:32 UTC 2012


Public bug reported:

This code triggers the issue:
font = ImageFont.truetype("/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-C.ttf",36)
font.color = "black"
draw = ImageDraw2.Draw(background)
draw.text((300,300),d.display_name,font)

Original version:
    def text(self, xy, text, font):
        if self.transform:
            xy = ImagePath.Path(xy)
            xy.transform(self.transform)
        self.draw.text(xy, text, font=font.font, fill=font.color)

I fixed it locally by passing along the font to ImageDraw.text rather than font.font:
    def text(self, xy, text, font):
        if self.transform:
            xy = ImagePath.Path(xy)
            xy.transform(self.transform)
        self.draw.text(xy, text, font=font, fill=font.color)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python-imaging 1.1.7-4 [modified: usr/share/pyshared/PIL/ImageDraw.py usr/share/pyshared/PIL/ImageDraw2.py]
ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Wed May 23 10:45:58 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110919)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python-imaging
UpgradeStatus: Upgraded to precise on 2012-01-06 (137 days ago)

** Affects: python-imaging (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug precise

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-imaging in Ubuntu.
https://bugs.launchpad.net/bugs/1003302

Title:
  AttributeError: getmask from in ImageDraw.py called from
  ImageDraw2.text()

Status in “python-imaging” package in Ubuntu:
  New

Bug description:
  This code triggers the issue:
  font = ImageFont.truetype("/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-C.ttf",36)
  font.color = "black"
  draw = ImageDraw2.Draw(background)
  draw.text((300,300),d.display_name,font)

  Original version:
      def text(self, xy, text, font):
          if self.transform:
              xy = ImagePath.Path(xy)
              xy.transform(self.transform)
          self.draw.text(xy, text, font=font.font, fill=font.color)

  I fixed it locally by passing along the font to ImageDraw.text rather than font.font:
      def text(self, xy, text, font):
          if self.transform:
              xy = ImagePath.Path(xy)
              xy.transform(self.transform)
          self.draw.text(xy, text, font=font, fill=font.color)

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: python-imaging 1.1.7-4 [modified: usr/share/pyshared/PIL/ImageDraw.py usr/share/pyshared/PIL/ImageDraw2.py]
  ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
  Uname: Linux 3.2.0-24-generic x86_64
  ApportVersion: 2.0.1-0ubuntu7
  Architecture: amd64
  Date: Wed May 23 10:45:58 2012
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110919)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: python-imaging
  UpgradeStatus: Upgraded to precise on 2012-01-06 (137 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-imaging/+bug/1003302/+subscriptions




More information about the foundations-bugs mailing list