#1
Posted
:
Monday, December 4, 2017 11:49:46 AM(UTC)
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.
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.