LEADTOOLS Support
Imaging
Imaging SDK Questions
Re: Scaling and rotating image then save it to disk
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, November 20, 2012 6:50:51 AM(UTC)
Groups: Registered
Posts: 3
Hi there,
yesterday I had some conversation in live chat trying to figure out an approach for the following problem.I have attached a sample application for better demonstration - please fix reference
paths before running application. First we load an image into the RasterViewer component. Then press rotate button twice. Afterwards set scale factor to 200 %. Set the scrollbar to the middle of the available space. Within the RasterImageViewer we now have an extract of the initial image, double in size turned on the head and a lot of its original content cut on the left and the right hand side.
Hitting the save button, I want to save this image with double size turned on the head and ONLY the visible part of the image, in the sample project attached I would expect an image with height and width nearly the same values. In the textbox You have the temp file where the image is stored. But only the scaling seems to work properly. Can command class calls be called in a row to stick in their effect?
Thank You for Your help,
Andre
#2
Posted
:
Wednesday, November 21, 2012 7:57:47 AM(UTC)
Groups: Registered, Tech Support
Posts: 179
Andre,
Your code uses fast rotation by changing the view perspective. This makes it difficult to work with image rectangles because it can confuse width with height or top with bottom.
Therefore, I changed the image back to TopLeft view perspective before taking the view rectangle. I also made a few other changes to simplify the code.
Please see attached modified project and tell me if it does what you need.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Friday, November 23, 2012 3:30:12 AM(UTC)
Groups: Registered
Posts: 3
Wow great perfectly does what I wanted it to do.
Have a nice weekend [B] :)
LEADTOOLS Support
Imaging
Imaging SDK Questions
Re: Scaling and rotating image then save it to disk
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.