This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, October 29, 2008 1:12:43 PM(UTC)
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
#2
Posted
:
Wednesday, October 29, 2008 1:14:12 PM(UTC)
Groups: Registered
Posts: 18
#3
Posted
:
Thursday, October 30, 2008 5:02:45 AM(UTC)
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.