[mythtv-users] MythArchive fails during Menu creation
John Pilkington
johnpilk222 at gmail.com
Tue Aug 7 22:10:09 UTC 2018
On 07/08/18 20:24, Andrew Stadt wrote:
> On 07/08/18 01:48 PM, John Pilkington wrote:
>> I used to create lots of DVD images but haven't done so recently; a
>> library of DVDs takes up too much space. But I just tried again and
>> it failed. I was trying to convert from mythlink 'Videos' but it
>> fails with Recordings too.
>>
>> The theme, and the line numbers in mythburn.py, will be non-standard.
>>
>> This is on my fc27 box running V30-Pre-11d42... mythburn.py line 1 is:
>>
>> #! /usr/bin/python2
>>
>> Googling 'cannot write mode RGBA as JPEG' gets lots of hits, which I
>> haven't yet studied. Has anyone else?
>>
>> {{{
>>
>> Added button image /usr/share/mythtv/mytharchive/images/next.png
>> Added next page button
>> ------------------------------------------------------------
>> Traceback (most recent call last):
>> File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 5341,
>> in main
>> processJob(job)
>> File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 5039,
>> in processJob
>> createMenu(format, dpi, files.length)
>> File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 3685,
>> in createMenu
>> bgimage.save(os.path.join(getTempPath(),"background-%s.jpg" %
>> page),"JPEG", quality=99)
>> File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1928,
>> in save
>> save_handler(self, fp, filename)
>> File "/usr/lib64/python2.7/site-packages/PIL/JpegImagePlugin.py",
>> line 607, in _save
>> raise IOError("cannot write mode %s as JPEG" % im.mode)
>> IOError: cannot write mode RGBA as JPEG
>> ------------------------------------------------------------
>> Saving settings: host hp_fed1, name MythArchiveLastRunStatus, data Failed
>> Saving settings: host hp_fed1, name MythArchiveLastRunEnd, data
>> 2018-08-07 13:54:02
>>
>> )))
>>
>> John P
>>
> Apparently the jpeg library will now refuse to attempt to save images
> with an alpha channel as jpegs (which don't support alpha).
>
> I'm not sure who is maintaining mythburn at the moment, but I guess you
> have two options. 1. Choose a background image with no alpha channel,
> or patch the code to flatten the image if it has an alpha channel.
>
> On my phone at the moment, so really can't come up more.
>
Thanks. It looks as if assembling the menu screen depends on alpha to
distinguish previews from background. Maybe a simpler theme will work -
otherwise it looks as if will be messy. Or maybe replacing jpeg by png
is worth a try. I've never got into this...
More information about the mythtv-users
mailing list