Why does use of -s suppress use of -x?

View: New views
2 Messages — Rating Filter:   Alert me  

Why does use of -s suppress use of -x?

by smontanaro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you give the -s flag on the command line the -x flag is suppressed with
this bit of code in main():

  if( exportfile_name && control.debug_level == 0 &&
      input_control.scale == 0 && input_control.specialtype == 0 &&
      !input_control.copy )
    {
    ...

Is there some reason use of a scaling factor should disable writing
information to the export file?

Thx,

--
Skip Montanaro - skip@... - http://www.mojam.com/
"The hippies and the hipsters did some great stuff in the sixties,
but the geeks pulled their weight too." -- Billy Bragg


_______________________________________________
Bug-ocrad mailing list
Bug-ocrad@...
http://lists.gnu.org/mailman/listinfo/bug-ocrad

Re: Why does use of -s suppress use of -x?

by Bugzilla from ant_diaz@teleline.es :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

skip@... wrote:

> If you give the -s flag on the command line the -x flag is suppressed with
> this bit of code in main():
>
>   if( exportfile_name && control.debug_level == 0 &&
>       input_control.scale == 0 && input_control.specialtype == 0 &&
>       !input_control.copy )
>     {
>     ...
>
> Is there some reason use of a scaling factor should disable writing
> information to the export file?

Yes. The export file predates the scale factor in ocrad and was supposed
to contain coordinates relative to the input file, so that a frontend
program could locate characters, etc, on it.

When a scaling factor is specified, the scaled image replaces the input
image inside ocrad, and the exported coordinates wouldn't correspond to
the input file anymore.

Of course this behaviour may be changed, perhaps adding a "scale" line
to the export file, if nobody finds a reason not to. Meanwhile you can
remove the offending test from main.cc, or copy the scaled file and use
ocrad on the copy:
`ocrad -s2 -C -o file2.pbm file.pbm'
`ocrad -x file2.orf file2.pbm'


Regards,
Antonio.


_______________________________________________
Bug-ocrad mailing list
Bug-ocrad@...
http://lists.gnu.org/mailman/listinfo/bug-ocrad