[REQUEST] Script to resize fanart
#1
Resizing the fanart is always one of the first things that people suggest for reducing memory useage on the Xbox. Would it be possible to create a script to automate this within XBMC?
Reply
#2
Is this working now? http://trac.xbmc.org/ticket/4856

I guess that would make my request unnecessary.
Reply
#3
I see no activity on that ticket, so probably not. Until it's reviewed, IRFanView is a good program for batch re-sizing images.
Reply
#4
I'm on a Mac so I can't use irfanview, but there are other programs that work. I'm just trying to avoid transferring them to the computer and then back to the xbox. There isn't really a way to keep track of what's been resized and what hasn't. So I have to load all of them every time.
Reply
#5
Well, once you get them all done and transferred, you could use a program like Media Companion or MIP, both have options for re-sizing the fanart that they download.

On a side note, I keep things a little more organized by having a "movies" folder and a "new movies" folder. I don't move something from the new movies to movies unless I know I want to keep it and I have all the .nfo, .tbn and fanart correct for it.
Reply
#6
I agree that this would be useful!

An automated process that resized the fanart when it was initially downloaded would save a lot of extra effort involved for those of us running on XBoxes.
Reply
#7
joebrady Wrote:Well, once you get them all done and transferred, you could use a program like Media Companion or MIP, both have options for re-sizing the fanart that they download.

I wish I could use either one of those programs, but neither of them work on a Mac.
Reply
#8
this is pil_util.py included with the AMT script, you pass it the path to your image. maybe someone will help and you can use this as a base for what you need. i'm too busy.

you'll also need PIL included with AMT. this does work on osx XBMC.

Code:
"""
    Module for creating thumbs
"""
import sys
import os
#sys.path.append( os.path.join( os.path.dirname( sys.modules[ "pil_util" ].__file__ ), "_PIL.zip" ) )
from PIL import Image, ImageEnhance

def makeThumbnails( poster ):
    try:
        # setup thumb names and size
        size = ( 104, 154, )#( 26, 38 )261x385
        thumbnail = "%s.png" % ( os.path.splitext( poster )[0], )
        watched_thumbnail = "%s-w.png" % ( os.path.splitext( poster )[0], )
        # open poster jpeg
        im = Image.open( poster )
        # create thumbnail
        im.thumbnail( size, Image.ANTIALIAS )
        im = im.convert( "RGBA" )
        im.save( thumbnail, "PNG" )
        # create watched thumbnail
        alpha = im.split()[ 3 ]
        alpha = ImageEnhance.Brightness( alpha ).enhance( 0.2 )
        im.putalpha( alpha )
        im.save( watched_thumbnail, "PNG" )
        return True
    except:
        return False
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
Thanks! So... anyone able to help us out?
Reply
#10
2-7offsuit Wrote:Thanks! So... anyone able to help us out?

Please? Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
[REQUEST] Script to resize fanart0