ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 About automatic rotation during scanning

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Flashcqxg Posted - Jul 16 2023 : 22:13:05
1. My scanner supports automatic rotation based on text direction;
2. I set the scanning software that comes with the scanner to allow automatic rotation based on the text direction;
3. Then I set ImageEnMView1. MIO. TwainParams. AutoRotate in the Delphi program:=False;
But the images scanned through ImageEnMView actually rotate automatically according to the direction of the text. How can I solve this problem? Thank you!
10   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 18 2023 : 17:16:42
Hi

Yes, it is a new test variable. But you need to be using the latest beta, v12.2.0.0718.

Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jul 17 2023 : 23:41:42
Sorry, I didn't understand:
IegExplicitlySetTwainCapabilities:=True;
xequte Posted - Jul 17 2023 : 22:54:57
Hmm, can you email for a test version where you can explicitly force setting of Twain capabilities using:

iegExplicitlySetTwainCapabilities := True;

Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jul 17 2023 : 22:45:56
So in this case it auto-rotates anyway? Correct?
—Yes.I can not prevent it auto-rotation.


And if you insert SaveToFile/LoadFromFile it prevents the auto-rotation?

—Yes.If I use SourceSettings.SaveToFile to disable rotation and then use SourceSettings.LoadFromFile to load the settings, it will not automatically rotate.
xequte Posted - Jul 17 2023 : 22:39:50
Great, thanks.

So in this case it auto-rotates anyway? Correct?

And if you insert SaveToFile/LoadFromFile it prevents the auto-rotation?

Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jul 17 2023 : 22:22:24
My Code:

if ImageEnMView1.MIO.SelectAcquireSource([ieaTwain, ieaWIA]) then
  begin
    case ImageEnMView1.MIO.SelectedAcquireSource.Api of
      ieaTwain:
        Memo1.Lines.Add('Api=ieaTwain');
      ieaWIA:
        Memo1.Lines.Add('Api=ieaWIA');
      ieaDCIM:
        Memo1.Lines.Add('Api=ieaDCIM');
      ieaNone:
        Memo1.Lines.Add('Api=ieaNone');
    end;

    if ImageEnMView1.MIO.TwainParams.IsCapabilitySupported(ICAP_AUTOMATICROTATE) then
      Memo1.Lines.Add('ICAP_AUTOMATICROTATE=True')
    else
      Memo1.Lines.Add('ICAP_AUTOMATICROTATE=False');

    if ImageEnMView1.MIO.TwainParams.AutoRotate then
      Memo1.Lines.Add('AutoRotate=True')
    else
      Memo1.Lines.Add('AutoRotate=False');

    with ImageEnMView1.MIO.TwainParams do
    begin
      AutoRotate := False;
      VisibleDialog := False;
      ShowSettingsOnly := False;
    end;

    if ImageEnMView1.MIO.TwainParams.AutoRotate then
      Memo1.Lines.Add('AutoRotate=True')
    else
      Memo1.Lines.Add('AutoRotate=False');
    ImageEnView1.Blank;
    ImageEnView1.Clear;
    ImageEnView1.Update;
    ImageEnMView1.MIO.Acquire();
  end;


Api=ieaTwain
ICAP_AUTOMATICROTATE=True
AutoRotate=False
AutoRotate=False


xequte Posted - Jul 17 2023 : 22:09:04
So it is as expected after SaveToFile (AutoRotate=False prevents rotation), but not as expected after LoadFromFile (AutoRotate=False has no effect)? Is that correct?

What is the value of AutoRotate before setting/loading in each case?

Can you show me some of the code that illustrates the issue?



Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jul 17 2023 : 21:40:43
If I pass ImageEnMView1. MIO. TwainParams. SourceSettings. SaveToFile prohibits automatic rotation and saves it to the configuration file. Then, if the configuration file is called through SourceSettings. LoadFromFile for scanning, the automatic rotation will not occur.
Flashcqxg Posted - Jul 17 2023 : 21:36:02
Hi,
I tested it and my scanner supports automatic rotation.
xequte Posted - Jul 17 2023 : 21:24:31
Hi

What is the value of ImageEnMView1.MIO.TwainParams.AutoRotate before you set it to false? (It should already be false)

Enabling AutoRotate sets the capability ICAP_AUTOMATICROTATE. The scanner may not honor the passed value.

Does IsCapabilitySupported( ICAP_AUTOMATICROTATE ) return true?

https://www.imageen.com/help/TIETwainParams.IsCapabilitySupported.html

Also, are you definitely acquiring via Twain (rather than WIA, for example)?



Nigel
Xequte Software
www.imageen.com