Efficiently create an image album by combining multiple images or photos into a cohesive multi-frame or multi-page format. This versatile composition supports a broad spectrum of input image formats and seamlessly generates popular output multi-page formats like PDF, TIFF, and DICOM.
using System; | |
using Aspose.Imaging; | |
using Aspose.Imaging.FileFormats.Pdf; | |
namespace CSharpTutorials | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
if(args.Lenght<3) | |
{ | |
Console.WriteLine("Please specify inpur folder with images to merge and "); | |
Console.WriteLine("wildcard mask of the input images (i.e. *.png or *.jpg) and"); | |
Console.WriteLine("output folder to create image album"); | |
return; | |
} | |
// Valid image album plug-in license use example | |
Metered metered = new Metered(); | |
metered.SetLicense("***********", // public key | |
"***********" // private key | |
); | |
string OutputDirectory = Path.Combine(TestDirectory, "ImageAlbum"); | |
if (!Directory.Exists(OutputDirectory)) | |
{ | |
Directory.CreateDirectory(OutputDirectory); | |
} | |
var images = new List<Image>(); | |
foreach (var fileName in Directory.GetFiles(TestDirectory, "*.png")) | |
{ | |
var image = Image.Load(fileName); | |
images.Add(image); | |
} | |
try | |
{ | |
var outputPath = Path.Combine(OutputDirectory, "image_album.pdf"); | |
MakeAlbum(images, new PdfOptions(), outputPath); | |
} | |
finally | |
{ | |
images.ForEach(image => image.Dispose()); | |
} | |
} | |
void MakeAlbum(List<Image> images, ImageOptionsBase imageOptions, string outputPath) | |
{ | |
using (var image = Image.Create(images.ToArray())) | |
{ | |
image.Save(outputPath, imageOptions); | |
} | |
} | |
} | |
} |
The Photo Album Maker can be integrated with various services to enhance your workflow.
The Photo Album Maker supports a variety of image formats including JPEG, PNG, BMP, and TIFF.
Yes, it can create multi-page outputs in several formats including PDF, TIFF, and DICOM.
Yes, you can download a free trial version from our website.