Bruno … I thought of the integers also so have been trying to modify the code 
to ensure calculated values are integers where required. However not being a 
perl expert I’ve run into an error I can’t understand.

Following some examples in your code I wrote:

>     $i->{w} = int ($i->{w} *= $R);
>     $i->{h} = int ($i->{h} *= $R);
>     $i->{d} = int ($i->{d} *= $R if $i->{d} =~ /^[-0-9.]+$/);
>     $i->{e} = int ($i->{e} *= $R if $i->{e} =~ /^[-0-9.]+$/);
>     $i->{Vx} = int ($i->{Vx} *= $R if $i->{Vx} =~ /^[-0-9.]+$/);
>     $i->{Vy} = int ($i->{Vy} *= $R if $i->{Vy} =~ /^[-0-9.]+$/);


The first two lines seem to work but then I get an error (I think the third 
line above is line 34) as follows:

> syntax error at /Applications/Panotools-Script-0.28/bin/ptoscale line 34, 
> near "$R if"
> Global symbol "$i" requires explicit package name at 
> /Applications/Panotools-Script-0.28/bin/ptoscale line 35.
> Global symbol "$i" requires explicit package name at 
> /Applications/Panotools-Script-0.28/bin/ptoscale line 35.
> syntax error at /Applications/Panotools-Script-0.28/bin/ptoscale line 35, 
> near "$R if"
> Global symbol "$i" requires explicit package name at 
> /Applications/Panotools-Script-0.28/bin/ptoscale line 35.



Also, if d, e, Vx, and Vy are pixel values why are you even doing the match in 
those lines???

Any suggestions would help. 



> On Jul 10, 2016, at 2:58 PM, Bruno Postle <[email protected]> wrote:
> 
> 
> 
> On 10 July 2016 05:08:22 BST, Donald Johnston wrote:
>> Bruno, thanks for your feedback on this.
>> 
>> I’ve modified you ptodouble to create ptoscale (see below). Will this
>> work? Feel free to do with this as you please.
> 
> Hi Donald, I haven't tried your version yet. The reason why I created two 
> scripts was perhaps over cautious, but I was concerned that although most 
> numbers in a PTO project are floats, critical numbers like image dimensions 
> have to be integers. Since most of my photo dimensions are multiples of 
> eight; scaling by half, quarter etc.. seemed safest to preserve image aspect 
> ratios.
> 
> -- 
> Bruno
> 
> -- 
> A list of frequently asked questions is available at: 
> http://wiki.panotools.org/Hugin_FAQ
> --- 
> You received this message because you are subscribed to the Google Groups 
> "hugin and other free panoramic software" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/hugin-ptx/97468309-E822-4AFF-9C28-00198C555E46%40postle.net.
> For more options, visit https://groups.google.com/d/optout.

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/96E659FE-E06A-4DD0-94DC-D81AE9FE0625%40accesscomm.ca.
For more options, visit https://groups.google.com/d/optout.

Reply via email to