Python client and png backgrounds

Asked by Brian Mathis

I just got new client that I will be installing your product in. I setup Ubuntu 10.04, Xibo server 1.1.1, and the 1.1 python client from bzr. I setup a few layouts with different background and when the layout with PNG background cycled, the python client would stay on a black screen until I quit the program. I changed the background to a JPG and it worked flawlessly. Is there a known bug with PNG backgrounds?

The log didnt save, but here is the last bit of output from the terminal

/usr/lib/python2.6/dist-packages/PIL/Image.py:1298: DeprecationWarning: integer argument expected, got float
  im = self.im.stretch(size, resample)
Exception in thread Thread-25:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "XiboClient.py", line 1262, in run
    image.save(thumb, image.format)
  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1439, in save
    save_handler(self, fp, filename)
  File "/usr/lib/python2.6/dist-packages/PIL/PngImagePlugin.py", line 517, in _save
    o32(im.size[0]), o32(im.size[1]), # 0: size
  File "/usr/lib/python2.6/dist-packages/PIL/PngImagePlugin.py", line 424, in o32
    return chr(i>>24&255) + chr(i>>16&255) + chr(i>>8&255) + chr(i&255)
TypeError: unsupported operand type(s) for >>: 'float' and 'int'

--
Also, I noticed that the Add Image button that appears when you are changed the background of a layout does not do anything (Firefox & Chrome). Just thought I'd mention that.

Thanks,

Brian

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Harrington
Solved:
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

Pretty sure both are fixed already but I'll check.

Alex

This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer

Revision history for this message
Best Alex Harrington (alexharrington) said :
#2

https://bugs.launchpad.net/xibo/+bug/610615

http://bazaar.launchpad.net/~xibo-maintainers/xibo/biela/annotate/head%3A/client/python/XiboClient.py#L1242

Can you try turning off lowTextureMemory in the config options and see if it works then. If it does, I think we've found the culprit.

Alex

Revision history for this message
Brian Mathis (bcmathis) said :
#3

Changing LowTextureMemory from True to False fixed the issue. Is that a result of my machine or the code itself?

Revision history for this message
Alex Harrington (alexharrington) said :
#4

It's a bug. It's just one of those bugs that you look at and wonder why it's never come up before. I can't see a reason why that code would ever not throw that exception - unless of course ImageMagik have quietly changed the api. I'm also 99% convinced I've had this problem before and that I'd fixed it - anyhow, it's a simple fix!

It won't be in 1.2.0a2 client as I've just pushed that out, but it will be in my 1.2.0a3 branch (https://code.launchpad.net/~alexharrington/xibo/pyclient-1.2.0a3) when I get around to it - probably not tonight now as it's late!

You probably want to be running with lowTextureMemory set true as most graphics cards will struggle with it set to false - it depends alot on what you're showing.

Alex

Revision history for this message
Alex Harrington (alexharrington) said :
#5

http://bazaar.launchpad.net/~alexharrington/xibo/pyclient-1.2.0a3/revision/185

Should be trivial for you to backport that on to an older client version if you need to.

Alex

Revision history for this message
Brian Mathis (bcmathis) said :
#6

Thanks Alex. Ill just use JPG for the time being. Its not a huge problem, just preference for the PNG format.

Have a good one and keep up the good work.

Revision history for this message
Brian Mathis (bcmathis) said :
#7

Thanks Alex Harrington, that solved my question.