GroupDocs.Merger allows developers to combine multiple BMP documents in the preferred order and save them as a single file.
About BMP File Format
Files having extension .BMP represent Bitmap Image files that are used to store bitmap digital images. These images are independent of graphics adapter and are also called device independent bitmap (DIB) file format. This independency serves the purpose of opening the file on multiple platforms such as Microsoft Windows and Mac. The BMP file format can store data as two-dimensional digital images in both monochrome and colored formats with various color depths.
Download and Configure
Use the downloads section to download API DLLs or MSI installer or NuGet:
PM>Install-PackageGroupDocs.Merger
Source BMP images
How to merge BMP files in vertical mode
The following example demonstrates how to merge image files in vertical mode with several lines of C# code:
Create an instance of Merger class and pass source image file path as a constructor parameter. You may specify absolute or relative file path as per your requirements.
Add another image file to merge with Join method and pass instance of ImageJoinOptions class as a method parameter. Repeat this step for other image documents you want to merge.
Call Merger class Save method and specify the filename for the merged image file as parameter.
// Load the source image fileusing(Mergermerger=newMerger(@"c:\sample1.bmp")){// Define image join options with vertical join modeImageJoinOptionsjoinOptions=newImageJoinOptions(ImageJoinMode.Vertical);// Add another image file to mergemerger.Join(@"c:\sample2.bmp",joinOptions);// Add next image file to mergemerger.Join(@"c:\sample3.bmp",joinOptions);// Merge image files and save resultmerger.Save(@"c:\merged.bmp");}