This quick guide explains how to merge TIFF files into one using C# REST API. You will learn to combine TIFF files using C# REST Interface with the help of a .NET-based Cloud SDK. The sample code contains all the necessary steps, starting from loading the TIFF files into the Cloud storage and finally retrieving the merged TIFF file from the Cloud.
Prerequisite
- Create an account API credentials to merge TIFF files
- Download Aspose.Imaging Cloud SDK for Dotnet for combining TIFF images
- Setup a C# project with the above SDK
Steps to Combine Multiple TIFF Files into One using C# Low Code API
- Create the ImagingApi instance with your clientId, clientSecret, and Configuration.DefaultBaseUrl for the authentication
- Specify your input TIFFs and the output TIFF name to be used in the program
- Read into memory and upload both TIFFs to storage using the UploadFileRequest() method, so the API can work with them
- Create the AppendTiffRequest object by setting the base TIFF, append TIFF, and Cloud storage information
- Merge the TIFFs by calling the AppendTiff() method, which appends the second file onto the first
- Fetch the merged file using DownloadFileRequest, save it locally, and print the success message
These steps summarize the process to combine TIFF files into one using C# RESTful Service. Create the ImagingApi object, specify the file names, read them into memory, and upload to the Cloud storage, create and configure the AppendTiffRequest object for the operation, and finally call the AppendTiff() method to merge the TIFF files in the Cloud storage.
Code to Combine TIFF Files into One TIFF using C# .NET-based API
This code demonstrates the process of how to merge TIFF files. You may improvise the code to validate the existence of the files and check their size before uploading them to the Cloud storage. You can also enable debug: true temporarily to capture request/response details while troubleshooting.
This article has taught us the process to merge TIFF files. To get metadata of an image, refer to the article Get metadata from image using C# REST API.