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 : Monday, December 4, 2017 11:49:46 AM(UTC)
Duncan Quirk

Groups: Registered, Tech Support, Administrators
Posts: 70

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

The LEADTOOLS CloudServices ImageProcessingEngine provides developers with an interface to handle queuing up and executing multiple image processing requests at once. This is done by providing the ProcessImage method a List of RasterImage Actions.When the ProcessImage method executes, it will apply every image processing action in the list to the file. This method will return an Enumerable list of streams depending on the format of the input stream, as well as the output format of the processed image.

Code:

         var inputStream = File.Open(@"leadtools.pdf", FileMode.Open);
         LoadDocumentOptions loadOptions = new LoadDocumentOptions()
         {
            FirstPageNumber = 1,
            LastPageNumber = 1
         };

         ImageProcessingEngine imageProcessingEngine = new ImageProcessingEngine();
         List<Action<RasterImage>> IPCommandList = new List<Action<RasterImage>>();

         RotateRequest rotateRequest = new RotateRequest()
         {
            Angle = 9000
         };
         IPCommandList.Add((img)=>imageProcessingEngine.RotateImage(rotateRequest, img));

         FlipRequest flipRequest = new FlipRequest()
         {
            HorizontalField = true
         };
         IPCommandList.Add((img) => imageProcessingEngine.FlipImage(flipRequest, img));

         var outputStream = imageProcessingEngine.ProcessImage(inputStream, loadOptions, RasterImageFormat.TifJpeg411, IPCommandList, null);
         foreach(var stream in outputStream)
         {
            //Process file
         }

Edited by user Friday, December 29, 2017 4:26:55 PM(UTC)  | Reason: Not specified

Duncan Quirk
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

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.

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-2020, Yet Another Forum.NET
This page was generated in 0.040 seconds.