kaa.imlib2 regressions (was Re: more about images)

Adam Charrett <[email protected]> Wed, 10 Nov 2010 14:03:31 +0000 (GMT)
Newsgroups gmane.comp.video.freevo.user,gmane.comp.video.freevo.devel
Message-ID <[email protected]>

On Wed, 10 Nov 2010, Alberto Hernando wrote:

> Hi.
> 
> I tried installing 1.8.2 but I couldn't. I think it needs python2.4 but I have 2.5 (debian stable). Going back to 2.4 breaks a lot of
> stuff, so I tried freevo-svn (and kaa-svn) again. I'm not worried about memo usage as described in the thread you linked. But I think I've
> figured what the exact problem is.
> I can go forward and backward well. I can play with the zoom (0-9). I can rotate images, use OSD. Everything with lots of big files. Great.
> But I can't exit. If I press ESC or S, then things are broken. I can still see the current image but I can't change it. Funny, I can still
> rotate it. My guess? The image plugin doesn't give back the control to freevo and they are fighting over the input. Freevo doesn't use 0-9
> so images rotate. Next minute, freevo updates the clock and I can see it. Same for free space. That's why I see the upper bar.
> 
> Ah, I just got this after ESC (no dump) and after D (this dump):
> 
> ATENCIÓN: Caught exception while processing OSD element!Traceback (most recent call last):
>   File "/usr/lib/python2.5/site-packages/freevo/skins/osd/skin.py", line 129, in render
>     obj.render(self.image, value_dict)
>   File "/usr/lib/python2.5/site-packages/freevo/skins/osd/skin.py", line 498, in render
>     image.blend(self.image,src_pos=(im_x,im_y), src_size=(w,h), dst_pos=(x,y))
>   File "/usr/lib/python2.5/site-packages/kaa/imlib2/image.py", line 844, in blend
>     self._image.blend(src._image, src_pos, src_size, (x, y), dst_size, int(alpha), merge_alpha)
> NameError: global name 'x' is not defined

This is a kaa.imlib2 regression (Rev 4381 introduced this), to fix it 
change the (x, y) on line 844 of /usr/lib/python2.5/site-packages/kaa/imlib2/image.py to be dst_pos

> ATENCIÓN: Caught exception while processing OSD element!Traceback (most 
recent call last):
>   File "/usr/lib/python2.5/site-packages/freevo/skins/osd/skin.py", line 129, in render
>     obj.render(self.image, value_dict)
>   File "/usr/lib/python2.5/site-packages/freevo/skins/osd/skin.py", line 179, in render
>     self.halign, self.valign)
>   File "/usr/lib/python2.5/site-packages/freevo/skins/osd/skin.py", line 316, in __drawstring
>     current_ellipses, ' ')
>   File "/usr/lib/python2.5/site-packages/freevo/skins/osd/skin.py", line 244, in __calc_line
>     last_char_size = self.__get_string_width(font, string[:c+1])
>   File "/usr/lib/python2.5/site-packages/freevo/skins/osd/skin.py", line 182, in __get_string_width
>     w,h,ha,va = font.get_text_size(string)
> ValueError: need more than 3 values to unpack

This is also a kaa regression (Rev 4379 introduced this), to fix it 
change the line 270 of /usr/lib/python2.5/site-packages/kaa/imlib2/ from
         return w + style_w, h + style_h, h_adv + style_w + v_adv + style_h
to
         return w + style_w, h + style_h, h_adv + style_w, v_adv + style_h
<snip> 
> 
> Well, I think this is quite a nasty bug, and with freevo-1 going to the final stage of development... should I move this to freevo-devel?
> What must I do?

I've copied the freevo-devel list for Jason to pick this up.

> thanks all
> Alberto
<snip>

Cheers

Adam

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev

_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users