Comment 10 for bug 219558

Revision history for this message
Laurent Dufrechou (laurent-dufrechou) wrote : RE: [Bug 219558] Re: Integer error with shadow effect

Ok solved for me, thx!

-----Message d'origine-----
De : <email address hidden> [mailto:<email address hidden>] De la part de stani
Envoyé : dimanche 20 avril 2008 01:04
À : <email address hidden>
Objet : [Bug 219558] Re: Integer error with shadow effect

OK, fixed in bazaar:
$ bzr commit -m "fix: shadow bug for not rgb(a) images"
modified phatch/actions/shadow.py
Committed revision 512.

You can test the code with:
bzr lp: phatch

This fix will be included in the next version of phatch 0.1.4, which
will is scheduled for the 26th of april.

I'll prepare a debdiff immediately for Ubuntu Hardy in the hope it can
still be included.

--
Integer error with shadow effect
https://bugs.launchpad.net/bugs/219558
You received this bug notification because you are a direct subscriber
of the bug.

Status in Phatch = Photo & Batch!: Confirmed
Status in Source Package "phatch" in Ubuntu: Confirmed

Bug description:
Trying to apply a shadow effect on my picture make this error:

Error 0: Impossible d'appliquer l'action Ombre sur l'image 'marport_A1_Analyst.bmp' dans le dossier:
C:\Users\ldufrechou\Desktop

an integer is required

Action: {'fields': {'Background Colour': '#FFFFFF',
            'Border': '4%',
            'Force Background Colour': u'true',
            'Horizontal Offset': '2%',
            'Shadow Blur': u'3',
            'Shadow Colour': '#444444',
            'Vertical Offset': '2%',
            '__enabled__': u'true'},
 'label': 'Shadow'}

Traceback (most recent call last):
  File "C:\Users\ldufrechou\Downloads\phatch-0.1.3.tar\phatch-0.1.3\phatch-0.1.3\phatch\core\api.py", line 277, in apply_action
    photo = action.apply(photo,setting,cache)
  File "C:\Users\ldufrechou\Downloads\phatch-0.1.3.tar\phatch-0.1.3\phatch-0.1.3\phatch\core\models.py", line 59, in apply
    photo = photo.apply_pil(self.pil,**values)
  File "C:\Users\ldufrechou\Downloads\phatch-0.1.3.tar\phatch-0.1.3\phatch-0.1.3\phatch\core\pil.py", line 377, in apply_pil
    self.get_layer().apply_pil(function,*arg,**keyw)
  File "C:\Users\ldufrechou\Downloads\phatch-0.1.3.tar\phatch-0.1.3\phatch-0.1.3\phatch\core\pil.py", line 399, in apply_pil
    self.image = function(self.image,*arg,**keyw)
  File "C:\Users\ldufrechou\Downloads\phatch-0.1.3.tar\phatch-0.1.3\phatch-0.1.3\phatch\actions\shadow.py", line 74, in drop_shadow
    image_mask = Image.new(mode,size,shadow_colour)
  File "C:\Python25\lib\site-packages\PIL\Image.py", line 1710, in new
    return Image()._new(core.fill(mode, size, color))
TypeError: an integer is required