Today, trying to slice an image with Gimp, with my Kubuntu Oneiric I have found this strange error message: “TypeError in slice(): integer argument expected, got float”.

This is a well know bug, but until it will be fixed, you can fix it by yourself.

Run from the terminal your favorite text editor (gedit, kate, vim, nano, pico, etc…) and replace the bad line with the good one.

sudo kate /usr/lib/gimp/2.0/plug-ins/py-slice.py

replace at line 172 (ymmv)

temp_image.crop(int(right – left), int(bottom – top), int(left), int(top))

with

temp_image.crop(int(right - left), int(bottom - top), int(left), int(top))

Save and close. Happy slicing! ;)

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.