This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > October 2007 > Faramir Panorama Split





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Faramir Panorama Split
DrJoel

2007-10-27, 6:23 pm

Has anyone used the Faramir Panorama Split script with X2? If yes is it
working? I am unable to get it to work.
RoseW

2007-10-27, 6:23 pm

DrJoel wrote:
| Has anyone used the Faramir Panorama Split script with X2? If yes is
| it working? I am unable to get it to work.

I tried it yesterday and it appears that it is incomplete- I haven't used it
before so that could be misconception. Anyway, I went into the script and
changed the save command to be NO SAVE...the result were two images each
having a white border added equal to the original image. Perhaps it did
work...added a narrow white border to each vertical side..so it split the
image and put it back together again which covered up the wide white area.
What is the expectation anyway when running this script?

I'll look at some of my other copies burned to cd and see if the script
contents are the same or have more words at the end.
Rose

--
http://rwgallery.webng.com/index.html


DrJoel

2007-10-27, 6:23 pm

RoseW wrote:
> DrJoel wrote:
> | Has anyone used the Faramir Panorama Split script with X2? If yes is
> | it working? I am unable to get it to work.
>
> I tried it yesterday and it appears that it is incomplete- I haven't used it
> before so that could be misconception. Anyway, I went into the script and
> changed the save command to be NO SAVE...the result were two images each
> having a white border added equal to the original image. Perhaps it did
> work...added a narrow white border to each vertical side..so it split the
> image and put it back together again which covered up the wide white area.
> What is the expectation anyway when running this script?
>
> I'll look at some of my other copies burned to cd and see if the script
> contents are the same or have more words at the end.
> Rose
>

Thank you Rose I appreciate the help.

Joel
DrJoel

2007-10-28, 7:20 pm

DrJoel wrote:
> RoseW wrote:
> Thank you Rose I appreciate the help.
>
> Joel

Rose here is the script I have can you check it against yours as mi9ne
won't do anything. Thanks.

Joel


RoseW

2007-10-28, 7:20 pm

DrJoel wrote:
|| DrJoel wrote:
||| RoseW wrote:
|||| DrJoel wrote:
||||| Has anyone used the Faramir Panorama Split script with X2? If yes
||||| is it working? I am unable to get it to work.
||||
|||| I tried it yesterday and it appears that it is incomplete- I
|||| haven't used it before so that could be misconception. Anyway, I
|||| went into the script and changed the save command to be NO
|||| SAVE...the result were two images each having a white border added
|||| equal to the original image. Perhaps it did work...added a narrow
|||| white border to each vertical side..so it split the image and put
|||| it back together again which covered up the wide white area.
|||| What is the expectation anyway when running this script?
||||
|||| I'll look at some of my other copies burned to cd and see if the
|||| script contents are the same or have more words at the end.
|||| Rose
||||
||| Thank you Rose I appreciate the help.
|||
||| Joel
|| Rose here is the script I have can you check it against yours as
|| mi9ne
|| won't do anything. Thanks.
||
|| Joel
|<snip>
|| # Let's start the spliting...
|| FaramirSplit(Environment, nSplitX, nSplitY, nSplitRatio,
|| bAutoSave, bAutoClose)

I guess there would be proof in the pudding if you tried the script in PSP9.
I thought it strange that the script just ended as above. Its more concise
in its contents than the other Faramir scripts. Perhaps if you posted a PING
to Suzie or any Script wise person the contents could be translated with
ease.
Since I got a white border on both vertical sides of a portrait image I'm
now assuming that if I had several images and applied the script to each
then a white side border would be on each which would give the space for
abutting each portion.???? I assumed it would take apart one image into
sections. Perhaps it has to be a very wide or huge image. I haven't tried it
in PSP9 so I'll get a wide original landscape tif and try it.
Rose


--
http://rwgallery.webng.com/index.html


RoseW

2007-10-28, 7:20 pm

RoseW wrote:
| DrJoel wrote:
||| DrJoel wrote:
|||| RoseW wrote:
||||| DrJoel wrote:
|||||| Has anyone used the Faramir Panorama Split script with X2? If yes
|||||| is it working? I am unable to get it to work.
|||||
||||| I tried it yesterday and it appears that it is incomplete- I
||||| haven't used it before so that could be misconception. Anyway, I
||||| went into the script and changed the save command to be NO
||||| SAVE...the result were two images each having a white border added
||||| equal to the original image. Perhaps it did work...added a narrow
||||| white border to each vertical side..so it split the image and put
||||| it back together again which covered up the wide white area.
||||| What is the expectation anyway when running this script?
|||||
||||| I'll look at some of my other copies burned to cd and see if the
||||| script contents are the same or have more words at the end.
||||| Rose
|||||
|||| Thank you Rose I appreciate the help.
||||
|||| Joel
||| Rose here is the script I have can you check it against yours as
||| mi9ne
||| won't do anything. Thanks.
|||
||| Joel
|| <snip>
||| # Let's start the spliting...
||| FaramirSplit(Environment, nSplitX, nSplitY, nSplitRatio,
||| bAutoSave, bAutoClose)
|
| I guess there would be proof in the pudding if you tried the script
| in PSP9.<snip>| Rose

I tried the Panosplit script in PSP9 and it doesn't work.
The script report is:
Traceback(most recent call last)
File"C:\Program Files\Jasc Software Inc\Paint Shop Pro
9\Scripts-Trusted\Faramir PanoSplit.PspScript",line 106 in Do
FaramirSplit(Environment,nSplitX,nSplitY,nSplitRatio,bAutoSave,bAutoClose)
File: C:\Program Files\Jasc Software Inc\Paint Shop Pro 9\Python
Libraries\FaramirSupportFunctions.py",line249,in FaramirSplit
nElementXX=float(nSourceSizeX)/nSplitX
ZeroDivisionError:float division

This is the content of the FaramirSupportFunctions.py fir the FaramirSplit-
info for anyone who is interested to sleuth out the above error

#
*******************************************************************************
# Function: FaramirSplit
# Author: Fabrice Roux aka Faramir.fr
# Purpose: Splits the current image into n images according to the
aspect ratio.
#
# Returns:
# Parameters: Environment - PSP environment :)
# nSplitX - number of horizontal chunks
# nSplitY - number of vertical chunks
# dAspectRatio - aspect ratio of the target images
# bSaveEnable - automatic image save (--> image_00_01.jpg)
# bFileClose - automatically close the saved image to save
some RAM
# Notes: The SelectAll + Crop is required to workaround a PSP bug.
#
********************************************************************************
def FaramirSplit(Environment, nSplitX, nSplitY, dAspectRatio, bSaveEnable,
bFileClose):

# Variables
nSourceSizeX = App.TargetDocument.Width
nSourceSizeY = App.TargetDocument.Height

# Let's get the basic information about the current image
lImageInfo = App.Do(Environment, 'ReturnImageInfo')
lFileName = lImageInfo[ 'FileName' ]
szFileName, szFileExtension = os.path.splitext(lFileName)

# Let's work with lower case only for online compatibility
szFileName = szFileName.lower()

# Calculation of the split matrix element size
nElementXX = float(nSourceSizeX) / nSplitX
nElementXY = float(nSourceSizeY) / nSplitY * dAspectRatio

nElementYY = float(nSourceSizeY) / nSplitY
nElementYX = float(nSourceSizeX) / nSplitX / dAspectRatio

# Taking the rounded version of the max value
nElementX = int(max(nElementXX, nElementXY) + 0.5)
nElementY = int(max(nElementYY, nElementYX) + 0.5)

# Final image size
nImageSizeX = nElementX * nSplitX
nImageSizeY = nElementY * nSplitY

# Calculation of the cuting offset (delta(x,y) from original image to
new image
nOffsetX = (nImageSizeX - nSourceSizeX) / 2
nOffsetY = (nImageSizeY - nSourceSizeY) / 2





--
http://rwgallery.webng.com/index.html


RoseW

2007-10-28, 7:20 pm

DrJoel wrote:
|| DrJoel wrote:
||| RoseW wrote:
|||| DrJoel wrote:
||||| Has anyone used the Faramir Panorama Split script with X2? If yes
||||| is it working? I am unable to get it to work.
||||
|||| I tried it yesterday and it appears that it is incomplete- I
|||| haven't used it before so that could be misconception. Anyway, I
|||| went into the script and changed the save command to be NO
|||| SAVE...the result were two images each having a white border added
|||| equal to the original image. Perhaps it did work...added a narrow
|||| white border to each vertical side..so it split the image and put
|||| it back together again which covered up the wide white area.
|||| What is the expectation anyway when running this script?
||||
|||| I'll look at some of my other copies burned to cd and see if the
|||| script contents are the same or have more words at the end.
|||| Rose
||||
||| Thank you Rose I appreciate the help.
|||
||| Joel
|| Rose here is the script I have can you check it against yours as
|| mi9ne
|| won't do anything. Thanks.
||
|| Joel
|| #
|| # Faramir PanoSplit.PspScript
|| #
|| # Faramir.fr's image spliter for PainShop Pro 8.x, 9.x and 10.x
|| #
|| # Story: I wrote this script to simplify the process of spliting
|| # my panoramic pictures into multiple images that fit my
|| # paper sheet aspect ratio.
|| #
|| # Version: 1.0.20050910
|| #
|| # History:
|| # 1.0 - Initial release
||
||
|| from JascApp import *
|| import JascUtils
|| from FaramirSupportFunctions import *
||
|| def ScriptProperties():
|| return {
|| 'Author': 'Fabrice Roux aka faramir.fr',
|| 'Copyright': 'Copyright 2005, Fabrice Roux, All Rights
|| Reserved.', 'Description': u'Panorama spliter: cuts an
|| image into paper sheet aspect ratio chunks.', 'Host':
|| u'Paint Shop Pro', 'Host Version': u'8.10'
|| }
||
|| def Do(Environment):
|| # ********************************
|| # *** Parameters section start ***
|| # ********************************
||
|| # Possible values:
|| # - Serie Ax : 1.414 (A4, A3,...)
|| # - US letter A, C, E : 1.294
|| # - US letter B, D : 1.545
|| # - Photo 3/2 : 1.5 (DSLR cameras size)
|| # - Photo 4/3 : 1.333 (compact cameras size)
||
|| dAspectRatio = 1.5
||
|| # Number of image chuncks to be cut in the image width
|| # example:
|| # a 4.5 aspect ratio image is cut in 3x1 sheets of 1.5
|| # if you want an even larger print set nWidthChunks to 2
|| # and you'll get a 6x2 sheets of 1.5
||
|| nWidthChunks = 1
||
|| # Automatic image save option
|| bAutoSave = 1
||
|| # Automatic image close option
|| bAutoClose = 0
||
|| # ********************************
|| # *** Parameters section stop ***
|| # ********************************
||
|| # Clear script debug output
|| App.Do( Environment, 'ScriptWndClear')
||
|| # EnableOptimizedScriptUndo
|| App.Do( Environment, 'EnableOptimizedScriptUndo', {})
||
|| # No image -> No script
|| if JascUtils.RequireADoc( Environment ) ==
|| App.Constants.Boolean.false: return
||
|| # Checkin the Paint Shop Pro version
|| if FaramirPSPVersionCheck(Environment, 8.1, 8.1) ==
|| App.Constants.Boolean.false: return
||
|| # Checking the support pack version
|| if FaramirSupportCheck(Environment, 1.3, 1.5) ==
|| App.Constants.Boolean.false: return
||
|| # A flatten image improves speed and prevent script errors
|| LayerProperties = App.Do( Environment, 'ReturnLayerProperties' )
|| if LayerProperties[ 'IsBackground' ] ==
|| App.Constants.Boolean.false:
||
|| # We need a flat image
|| App.Do( Environment, 'LayerMergeAll', {
|| 'GeneralSettings': {
|| 'ExecutionMode': App.Constants.ExecutionMode.Silent,
|| 'AutoActionMode': App.Constants.AutoActionMode.Match
|| }
|| })
||
|| # Image orientation: landscape
|| if (App.ActiveDocument.Width > App.ActiveDocument.Height):
|| nImageAR = float(App.ActiveDocument.Width) /
|| App.ActiveDocument.Height nSplitX = int(nImageAR /
|| dAspectRatio) nSplitY = nWidthChunks
|| nSplitRatio = dAspectRatio
||
|| # Image orientation: portrait
|| else:
|| nImageAR = float(App.ActiveDocument.Height) /
|| App.ActiveDocument.Width nSplitX = nWidthChunks
|| nSplitY = int(nImageAR / dAspectRatio)
|| nSplitRatio = 1/dAspectRatio
||
|| # Let's start the spliting...
|| FaramirSplit(Environment, nSplitX, nSplitY, nSplitRatio,
|| bAutoSave, bAutoClose)

In Pspx2 the script report is :
Executing Copy

Executing PasteGraphicAsNewImage

Executing SelectDocument

Executing ResizeCanvas

Executing SelectAll

Executing Crop

Script 'Faramir PanoSplit' has completed successfully.

A copy of the image has white borders on the landscape image top and bottom
but I cannot run the script again on a new image of same size -the error
message arrives.
Rose

--
http://rwgallery.webng.com/index.html




DrJoel

2007-10-28, 7:20 pm

RoseW wrote:
> DrJoel wrote:
> || DrJoel wrote:
> ||| RoseW wrote:
> |||| DrJoel wrote:
> ||||| Has anyone used the Faramir Panorama Split script with X2? If yes
> ||||| is it working? I am unable to get it to work.
> ||||
> |||| I tried it yesterday and it appears that it is incomplete- I
> |||| haven't used it before so that could be misconception. Anyway, I
> |||| went into the script and changed the save command to be NO
> |||| SAVE...the result were two images each having a white border added
> |||| equal to the original image. Perhaps it did work...added a narrow
> |||| white border to each vertical side..so it split the image and put
> |||| it back together again which covered up the wide white area.
> |||| What is the expectation anyway when running this script?
> ||||
> |||| I'll look at some of my other copies burned to cd and see if the
> |||| script contents are the same or have more words at the end.
> |||| Rose
> ||||
> ||| Thank you Rose I appreciate the help.
> |||
> ||| Joel
> || Rose here is the script I have can you check it against yours as
> || mi9ne
> || won't do anything. Thanks.
> ||
> || Joel
> || #
> || # Faramir PanoSplit.PspScript
> || #
> || # Faramir.fr's image spliter for PainShop Pro 8.x, 9.x and 10.x
> || #
> || # Story: I wrote this script to simplify the process of spliting
> || # my panoramic pictures into multiple images that fit my
> || # paper sheet aspect ratio.
> || #
> || # Version: 1.0.20050910
> || #
> || # History:
> || # 1.0 - Initial release
> ||
> ||
> || from JascApp import *
> || import JascUtils
> || from FaramirSupportFunctions import *
> ||
> || def ScriptProperties():
> || return {
> || 'Author': 'Fabrice Roux aka faramir.fr',
> || 'Copyright': 'Copyright 2005, Fabrice Roux, All Rights
> || Reserved.', 'Description': u'Panorama spliter: cuts an
> || image into paper sheet aspect ratio chunks.', 'Host':
> || u'Paint Shop Pro', 'Host Version': u'8.10'
> || }
> ||
> || def Do(Environment):
> || # ********************************
> || # *** Parameters section start ***
> || # ********************************
> ||
> || # Possible values:
> || # - Serie Ax : 1.414 (A4, A3,...)
> || # - US letter A, C, E : 1.294
> || # - US letter B, D : 1.545
> || # - Photo 3/2 : 1.5 (DSLR cameras size)
> || # - Photo 4/3 : 1.333 (compact cameras size)
> ||
> || dAspectRatio = 1.5
> ||
> || # Number of image chuncks to be cut in the image width
> || # example:
> || # a 4.5 aspect ratio image is cut in 3x1 sheets of 1.5
> || # if you want an even larger print set nWidthChunks to 2
> || # and you'll get a 6x2 sheets of 1.5
> ||
> || nWidthChunks = 1
> ||
> || # Automatic image save option
> || bAutoSave = 1
> ||
> || # Automatic image close option
> || bAutoClose = 0
> ||
> || # ********************************
> || # *** Parameters section stop ***
> || # ********************************
> ||
> || # Clear script debug output
> || App.Do( Environment, 'ScriptWndClear')
> ||
> || # EnableOptimizedScriptUndo
> || App.Do( Environment, 'EnableOptimizedScriptUndo', {})
> ||
> || # No image -> No script
> || if JascUtils.RequireADoc( Environment ) ==
> || App.Constants.Boolean.false: return
> ||
> || # Checkin the Paint Shop Pro version
> || if FaramirPSPVersionCheck(Environment, 8.1, 8.1) ==
> || App.Constants.Boolean.false: return
> ||
> || # Checking the support pack version
> || if FaramirSupportCheck(Environment, 1.3, 1.5) ==
> || App.Constants.Boolean.false: return
> ||
> || # A flatten image improves speed and prevent script errors
> || LayerProperties = App.Do( Environment, 'ReturnLayerProperties' )
> || if LayerProperties[ 'IsBackground' ] ==
> || App.Constants.Boolean.false:
> ||
> || # We need a flat image
> || App.Do( Environment, 'LayerMergeAll', {
> || 'GeneralSettings': {
> || 'ExecutionMode': App.Constants.ExecutionMode.Silent,
> || 'AutoActionMode': App.Constants.AutoActionMode.Match
> || }
> || })
> ||
> || # Image orientation: landscape
> || if (App.ActiveDocument.Width > App.ActiveDocument.Height):
> || nImageAR = float(App.ActiveDocument.Width) /
> || App.ActiveDocument.Height nSplitX = int(nImageAR /
> || dAspectRatio) nSplitY = nWidthChunks
> || nSplitRatio = dAspectRatio
> ||
> || # Image orientation: portrait
> || else:
> || nImageAR = float(App.ActiveDocument.Height) /
> || App.ActiveDocument.Width nSplitX = nWidthChunks
> || nSplitY = int(nImageAR / dAspectRatio)
> || nSplitRatio = 1/dAspectRatio
> ||
> || # Let's start the spliting...
> || FaramirSplit(Environment, nSplitX, nSplitY, nSplitRatio,
> || bAutoSave, bAutoClose)
>
> In Pspx2 the script report is :
> Executing Copy
>
> Executing PasteGraphicAsNewImage
>
> Executing SelectDocument
>
> Executing ResizeCanvas
>
> Executing SelectAll
>
> Executing Crop
>
> Script 'Faramir PanoSplit' has completed successfully.
>
> A copy of the image has white borders on the landscape image top and bottom
> but I cannot run the script again on a new image of same size -the error
> message arrives.
> Rose
>

What is interesting is that it worked perfectly in XI, but now I can't
get it to run in XI again. I do a huge amount of panoramas and this
script is a life saver. My printer is a Canon i960 which will not print
across two pages.
RoseW

2007-10-28, 7:20 pm

DrJoel wrote:
| RoseW wrote:
|| DrJoel wrote:
|||| DrJoel wrote:
||||| RoseW wrote:
|||||| DrJoel wrote:
||||||| Has anyone used the Faramir Panorama Split script with X2? If
||||||| yes is it working? I am unable to get it to work.
||||||
|||||| I tried it yesterday and it appears that it is incomplete- I
|||||| haven't used it before so that could be misconception. Anyway, I
|||||| went into the script and changed the save command to be NO
|||||| SAVE...the result were two images each having a white border
|||||| added equal to the original image. Perhaps it did work...added a
|||||| narrow white border to each vertical side..so it split the image
|||||| and put it back together again which covered up the wide white
|||||| area.
|||||| What is the expectation anyway when running this script?
||||||
|||||| I'll look at some of my other copies burned to cd and see if the
|||||| script contents are the same or have more words at the end.
|||||| Rose
||||||
||||| Thank you Rose I appreciate the help.
|||||
||||| Joel
|||| Rose here is the script I have can you check it against yours as
|||| mi9ne
|||| won't do anything. Thanks.
||||
|||| Joel
|||| #
|||| # Faramir PanoSplit.PspScript
|||| #
|||| # Faramir.fr's image spliter for PainShop Pro 8.x, 9.x and 10.x
|||| #
|||| # Story: I wrote this script to simplify the process of spliting
|||| # my panoramic pictures into multiple images that fit my
|||| # paper sheet aspect ratio.
|||| #
|||| # Version: 1.0.20050910
|||| #
|||| # History:
|||| # 1.0 - Initial release
||||
||||
|||| from JascApp import *
|||| import JascUtils
|||| from FaramirSupportFunctions import *
||||
|||| def ScriptProperties():
|||| return {
|||| 'Author': 'Fabrice Roux aka faramir.fr',
|||| 'Copyright': 'Copyright 2005, Fabrice Roux, All Rights
|||| Reserved.', 'Description': u'Panorama spliter: cuts an
|||| image into paper sheet aspect ratio chunks.', 'Host':
|||| u'Paint Shop Pro', 'Host Version': u'8.10'
|||| }
||||
|||| def Do(Environment):
|||| # ********************************
|||| # *** Parameters section start ***
|||| # ********************************
||||
|||| # Possible values:
|||| # - Serie Ax : 1.414 (A4, A3,...)
|||| # - US letter A, C, E : 1.294
|||| # - US letter B, D : 1.545
|||| # - Photo 3/2 : 1.5 (DSLR cameras size)
|||| # - Photo 4/3 : 1.333 (compact cameras size)
||||
|||| dAspectRatio = 1.5
||||
|||| # Number of image chuncks to be cut in the image width
|||| # example:
|||| # a 4.5 aspect ratio image is cut in 3x1 sheets of 1.5
|||| # if you want an even larger print set nWidthChunks to 2
|||| # and you'll get a 6x2 sheets of 1.5
||||
|||| nWidthChunks = 1
||||
|||| # Automatic image save option
|||| bAutoSave = 1
||||
|||| # Automatic image close option
|||| bAutoClose = 0
||||
|||| # ********************************
|||| # *** Parameters section stop ***
|||| # ********************************
||||
|||| # Clear script debug output
|||| App.Do( Environment, 'ScriptWndClear')
||||
|||| # EnableOptimizedScriptUndo
|||| App.Do( Environment, 'EnableOptimizedScriptUndo', {})
||||
|||| # No image -> No script
|||| if JascUtils.RequireADoc( Environment ) ==
|||| App.Constants.Boolean.false: return
||||
|||| # Checkin the Paint Shop Pro version
|||| if FaramirPSPVersionCheck(Environment, 8.1, 8.1) ==
|||| App.Constants.Boolean.false: return
||||
|||| # Checking the support pack version
|||| if FaramirSupportCheck(Environment, 1.3, 1.5) ==
|||| App.Constants.Boolean.false: return
||||
|||| # A flatten image improves speed and prevent script errors
|||| LayerProperties = App.Do( Environment, 'ReturnLayerProperties' )
|||| if LayerProperties[ 'IsBackground' ] ==
|||| App.Constants.Boolean.false:
||||
|||| # We need a flat image
|||| App.Do( Environment, 'LayerMergeAll', {
|||| 'GeneralSettings': {
|||| 'ExecutionMode':
|||| App.Constants.ExecutionMode.Silent,
|||| 'AutoActionMode':
|||| App.Constants.AutoActionMode.Match } })
||||
|||| # Image orientation: landscape
|||| if (App.ActiveDocument.Width > App.ActiveDocument.Height):
|||| nImageAR = float(App.ActiveDocument.Width) /
|||| App.ActiveDocument.Height nSplitX = int(nImageAR /
|||| dAspectRatio) nSplitY = nWidthChunks
|||| nSplitRatio = dAspectRatio
||||
|||| # Image orientation: portrait
|||| else:
|||| nImageAR = float(App.ActiveDocument.Height) /
|||| App.ActiveDocument.Width nSplitX = nWidthChunks
|||| nSplitY = int(nImageAR / dAspectRatio)
|||| nSplitRatio = 1/dAspectRatio
||||
|||| # Let's start the spliting...
|||| FaramirSplit(Environment, nSplitX, nSplitY, nSplitRatio,
|||| bAutoSave, bAutoClose)
||
|| In Pspx2 the script report is :
|| Executing Copy
||
|| Executing PasteGraphicAsNewImage
||
|| Executing SelectDocument
||
|| Executing ResizeCanvas
||
|| Executing SelectAll
||
|| Executing Crop
||
|| Script 'Faramir PanoSplit' has completed successfully.
||
|| A copy of the image has white borders on the landscape image top and
|| bottom but I cannot run the script again on a new image of same size
|| -the error message arrives.
|| Rose
||
| What is interesting is that it worked perfectly in XI, but now I can't
| get it to run in XI again. I do a huge amount of panoramas and this
| script is a life saver. My printer is a Canon i960 which will not
| print across two pages.

Revise my above statement...the second image was almost square and the
script wouldn't run.
Do you have a previous image that was done with the script that illustrates
what the finished result looks like? I could be way off base here thinking
the script only resizes, crops and has a white border.
Rose

--
http://rwgallery.webng.com/index.html


DrJoel

2007-10-28, 7:20 pm

RoseW wrote:
> DrJoel wrote:
> | RoseW wrote:
> || DrJoel wrote:
> |||| DrJoel wrote:
> ||||| RoseW wrote:
> |||||| DrJoel wrote:
> ||||||| Has anyone used the Faramir Panorama Split script with X2? If
> ||||||| yes is it working? I am unable to get it to work.
> ||||||
> |||||| I tried it yesterday and it appears that it is incomplete- I
> |||||| haven't used it before so that could be misconception. Anyway, I
> |||||| went into the script and changed the save command to be NO
> |||||| SAVE...the result were two images each having a white border
> |||||| added equal to the original image. Perhaps it did work...added a
> |||||| narrow white border to each vertical side..so it split the image
> |||||| and put it back together again which covered up the wide white
> |||||| area.
> |||||| What is the expectation anyway when running this script?
> ||||||
> |||||| I'll look at some of my other copies burned to cd and see if the
> |||||| script contents are the same or have more words at the end.
> |||||| Rose
> ||||||
> ||||| Thank you Rose I appreciate the help.
> |||||
> ||||| Joel
> |||| Rose here is the script I have can you check it against yours as
> |||| mi9ne
> |||| won't do anything. Thanks.
> ||||
> |||| Joel
> |||| #
> |||| # Faramir PanoSplit.PspScript
> |||| #
> |||| # Faramir.fr's image spliter for PainShop Pro 8.x, 9.x and 10.x
> |||| #
> |||| # Story: I wrote this script to simplify the process of spliting
> |||| # my panoramic pictures into multiple images that fit my
> |||| # paper sheet aspect ratio.
> |||| #
> |||| # Version: 1.0.20050910
> |||| #
> |||| # History:
> |||| # 1.0 - Initial release
> ||||
> ||||
> |||| from JascApp import *
> |||| import JascUtils
> |||| from FaramirSupportFunctions import *
> ||||
> |||| def ScriptProperties():
> |||| return {
> |||| 'Author': 'Fabrice Roux aka faramir.fr',
> |||| 'Copyright': 'Copyright 2005, Fabrice Roux, All Rights
> |||| Reserved.', 'Description': u'Panorama spliter: cuts an
> |||| image into paper sheet aspect ratio chunks.', 'Host':
> |||| u'Paint Shop Pro', 'Host Version': u'8.10'
> |||| }
> ||||
> |||| def Do(Environment):
> |||| # ********************************
> |||| # *** Parameters section start ***
> |||| # ********************************
> ||||
> |||| # Possible values:
> |||| # - Serie Ax : 1.414 (A4, A3,...)
> |||| # - US letter A, C, E : 1.294
> |||| # - US letter B, D : 1.545
> |||| # - Photo 3/2 : 1.5 (DSLR cameras size)
> |||| # - Photo 4/3 : 1.333 (compact cameras size)
> ||||
> |||| dAspectRatio = 1.5
> ||||
> |||| # Number of image chuncks to be cut in the image width
> |||| # example:
> |||| # a 4.5 aspect ratio image is cut in 3x1 sheets of 1.5
> |||| # if you want an even larger print set nWidthChunks to 2
> |||| # and you'll get a 6x2 sheets of 1.5
> ||||
> |||| nWidthChunks = 1
> ||||
> |||| # Automatic image save option
> |||| bAutoSave = 1
> ||||
> |||| # Automatic image close option
> |||| bAutoClose = 0
> ||||
> |||| # ********************************
> |||| # *** Parameters section stop ***
> |||| # ********************************
> ||||
> |||| # Clear script debug output
> |||| App.Do( Environment, 'ScriptWndClear')
> ||||
> |||| # EnableOptimizedScriptUndo
> |||| App.Do( Environment, 'EnableOptimizedScriptUndo', {})
> ||||
> |||| # No image -> No script
> |||| if JascUtils.RequireADoc( Environment ) ==
> |||| App.Constants.Boolean.false: return
> ||||
> |||| # Checkin the Paint Shop Pro version
> |||| if FaramirPSPVersionCheck(Environment, 8.1, 8.1) ==
> |||| App.Constants.Boolean.false: return
> ||||
> |||| # Checking the support pack version
> |||| if FaramirSupportCheck(Environment, 1.3, 1.5) ==
> |||| App.Constants.Boolean.false: return
> ||||
> |||| # A flatten image improves speed and prevent script errors
> |||| LayerProperties = App.Do( Environment, 'ReturnLayerProperties' )
> |||| if LayerProperties[ 'IsBackground' ] ==
> |||| App.Constants.Boolean.false:
> ||||
> |||| # We need a flat image
> |||| App.Do( Environment, 'LayerMergeAll', {
> |||| 'GeneralSettings': {
> |||| 'ExecutionMode':
> |||| App.Constants.ExecutionMode.Silent,
> |||| 'AutoActionMode':
> |||| App.Constants.AutoActionMode.Match } })
> ||||
> |||| # Image orientation: landscape
> |||| if (App.ActiveDocument.Width > App.ActiveDocument.Height):
> |||| nImageAR = float(App.ActiveDocument.Width) /
> |||| App.ActiveDocument.Height nSplitX = int(nImageAR /
> |||| dAspectRatio) nSplitY = nWidthChunks
> |||| nSplitRatio = dAspectRatio
> ||||
> |||| # Image orientation: portrait
> |||| else:
> |||| nImageAR = float(App.ActiveDocument.Height) /
> |||| App.ActiveDocument.Width nSplitX = nWidthChunks
> |||| nSplitY = int(nImageAR / dAspectRatio)
> |||| nSplitRatio = 1/dAspectRatio
> ||||
> |||| # Let's start the spliting...
> |||| FaramirSplit(Environment, nSplitX, nSplitY, nSplitRatio,
> |||| bAutoSave, bAutoClose)
> ||
> || In Pspx2 the script report is :
> || Executing Copy
> ||
> || Executing PasteGraphicAsNewImage
> ||
> || Executing SelectDocument
> ||
> || Executing ResizeCanvas
> ||
> || Executing SelectAll
> ||
> || Executing Crop
> ||
> || Script 'Faramir PanoSplit' has completed successfully.
> ||
> || A copy of the image has white borders on the landscape image top and
> || bottom but I cannot run the script again on a new image of same size
> || -the error message arrives.
> || Rose
> ||
> | What is interesting is that it worked perfectly in XI, but now I can't
> | get it to run in XI again. I do a huge amount of panoramas and this
> | script is a life saver. My printer is a Canon i960 which will not
> | print across two pages.
>
> Revise my above statement...the second image was almost square and the
> script wouldn't run.
> Do you have a previous image that was done with the script that illustrates
> what the finished result looks like? I could be way off base here thinking
> the script only resizes, crops and has a white border.
> Rose
>

No I wish I did, but I do think it did resize the Panorama since it
should have fit on three pages, but it fit on two.
Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews