Micro Applications to Merge, Convert and Resize Images
Micro applications are very useful when you need to repeatedly perform the same manipulation with images or photo files. In such cases, using a multi-functional image editor or image library is excessive for a single operation. To solve this problem, Aspose.Imaging image library is now available as a simple micro app designed for a specific function. You can easily merge several images to create a photo collage or convert and resize images or photos by using a small command line tool. Alternatively, you can also use the Aspose.Imaging micro app from your ะก# code via .NET compatible API.
Merge Images Micro App
The Aspose.Imaging merging application offers a wide range of options to meet your requirements. Our merge command line tool supports various input and output file formats, images layouts, and adjustments. You can save the resulting image with the specified width and height. Also, you can specify margin sizes around images in the photo collage and background colors by using verbal definitions or HTML hex codes.
All configuration options for controlling the merge operation are accessible via command line parameters. Here is an example of utilizing the merge utility:
> Aspose.Imaging.Image-Merge -i photo_1.jpg+photo_2.jpg+photo_3.jpg+photo_4.jpg+photo_5.jpg+photo_6.jpg \
-o ..\build-out\photo_collage_licensed.png \
-f png \
-a Smallest \
-d Vertical \
-b MediumSeaGreen \
-m 3 \
-C 2 \
-R 3 \
-W 500 \
-l <path to license file>
Merge App Parameters
In the command line, you can control the merge results by specifying parameters. To merge multiple images, use the -i
option with filenames and '+'
to combine them. Set the output file name with -o
and change the format with -f
, like merging six JPGs to a single PNG image.
You have the flexibility to adjust the images in the photo collage to the smallest or the largest dimensions, even if they have different sizes. This ensures that the images in the collage scale accordingly while maintaining their aspect ratio. Consequently, the proportions of your photos remain unaffected. You can arrange the collage either vertically, horizontally, or in a grid layout with a specified number of columns and rows. In the example above, we created a grid layout with a size of 2x3
, adjusted to the Smallest
image, and using the Vertical
direction. Additionally, the margin around pictures is set to 3
pixels, with a MediumSeaGreen
background color. Finally, specify the desired width of the images, for example, 500
pixels, and provide the path to the license file. You can find more information in Aspose.Imaging Merge release page.
Convert Image Mirco App
Using the Convert App is straightforward. You don’t need to open manually image files in an image editor and then save them back in another format. The convert app supports a wide range of file formats. Simply specify the input file name, the output file name, and the desired format from the command line:
> Aspose.Imaging.Image-Convert --input photo_1.jpg \
--output photo_converted.png \
--format png
In this example, we use a short command to convert a JPG image to the PNG format. Furthermore, the console utility assists in creating a workflow with scripts to automate large-scale image conversion operations. For more information, please visit Aspose.Imaging Convert release page.
Resize Image Micro App
Moreover, when converting image formats, you may find the need to resize the images or photos, a common requirement for preparing images for publication on websites. In the example below, we enlarge the input image by a resize factor of 150% and save it to an output file in PNG format:
> Aspose.Imaging.Image-Resize --input photo_1.jpg \
--output photo_with_increased_size.png \
--format png \
--resize_factor 150
If you execute the command in the console without parameters, a list of all available options will be displayed in the command output. Instead of a resize factor in percent, you can specify a particular width or height for resizing the image. By default, the resize app keeps the aspect ratio of the image, but you can change this using the option -k false
. Additionally, with the option -a
, you can specify the resizing algorithm. Refer to the Resize type options reference to explore all supported variants. Using the option -b
, you can set the background color of the resulting image. The default background color value is White
, but it can also be transparent or selected from the supported Verbal color list or specified in HTML HEX code expressions (e.g. #RGB format). For more details, you can visit Aspose.Imaging Resize release page.
Conclusion
With the Aspose.Imaging micro applications, you can manipulate images and photos using a command-line tool without the need for complicated image editors with numerous unnecessary functions. These dedicated console utilities simplify specific operations, enabling you to directly perform merge, convert, and resize manipulations with image files from the command line. For more product details and installation instructions, please visit the Aspose.Imaging Micro Apps Release site.
See also
How to edit your photo or image programmatically