Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, October 29, 2008 1:12:43 PM(UTC)
aallasudheer

Groups: Registered
Posts: 18


Hi,
We are using Document Imaging suite with OCR, C#, .Net 15
Please find the attached Image, if you view this in leadtools viewer it is displaying correctly, if we open this with windows picture and fax viewer, image is flipped over.
Here is what I am doing.
After scanning image (using TWAIN) I am checking the orientation, depending on the orientation degree I am rotating the image and then saving it to disk
Here is my code in _twain_AcquirePage Event
_rasterEngine.AddPage(e.Image, 0);
                            if (_rasterEngine.GetOrientationDegree(0) == 180)
                            {
                                e.Image.RotateViewPerspective(180);
                            }
                            _rasterEngine.RemovePage(0);
                            _codecs.Save(e.Image,
                           Path, Leadtools.RasterImageFormat.Tif,
                           0);
 
Please let me know if I need to do something else here to make this work in other viewers.
Thanks,
Sudheer
 

 

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, October 29, 2008 1:14:12 PM(UTC)
aallasudheer

Groups: Registered
Posts: 18


Here is the attachment
File Attachment(s):
WIPTest.TIF (829kb) downloaded 21 time(s).
 
#3 Posted : Thursday, October 30, 2008 5:02:45 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Sudheer,

Your code is rotating the view perspective of the image by 180 degrees, so you get this behavior.
Although the resulting file is correct (LEAD, ACDSee and the old Windows 2000 Imaging program can all load it correctly), some other applications (like MS Paint and Windows Picture and Fax Viewer) do not take into consideration this property, thus it will show it as a mirror image.

If you want to rotate the image in a way understood by all applications, you need to use the RotateCommand Class. Although this is slower than playing with the view perspective, it will work with almost all viewers.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.110 seconds.