Jeg kjører en batch-jobb i PSP for å “komprimere” bilden for å få ned filstørrelsen. De bildene som skal på web setter jeg 1024 punkter brede, og lar PSP håndtere høyden. For å gjøre det bruker jeg dette scriptet:
from JascApp import *

def ScriptProperties():
return {
‘Author’: u”,
‘Copyright’: u”,
‘Description’: u”,
‘Host’: u’Paint Shop Pro 9′,
‘Host Version’: u’9.02′
}

def Do(Environment):
# EnableOptimizedScriptUndo
App.Do( Environment, ‘EnableOptimizedScriptUndo’, {
‘GeneralSettings’: {
‘ExecutionMode’: App.Constants.ExecutionMode.Default,
‘AutoActionMode’: App.Constants.AutoActionMode.Match,
‘Version’: ((9,0,2),1)
}
})

# Resize
App.Do( Environment, ‘Resize’, {
‘AspectRatio’: None,
‘CurrentDimensionUnits’: App.Constants.UnitsOfMeasure.Pixels,
‘CurrentResolutionUnits’: App.Constants.ResolutionUnits.PixelsPerIn,
‘MaintainAspectRatio’: True,
‘Resample’: True,
‘ResampleType’: App.Constants.ResampleType.SmartSize,
‘ResizeAllLayers’: True,
‘Resolution’: 72,
‘Height’: None,
‘Width’: 1024,
‘GeneralSettings’: {
‘ExecutionMode’: App.Constants.ExecutionMode.Default,
‘AutoActionMode’: App.Constants.AutoActionMode.Match,
‘Version’: ((9,0,2),1)
}
})