A small utility tool and Java library for making circle shaped transparent profile pictures out of any rectangular pictures. Can be used as a Java command line tool as well as a Java library.
The pictures are cropped to square at first using center alignment. Then resized to the desired size, cropped to a circle, and finally decorated with a small border. The following samples represent the applied changes.
| Original | Result with 100px size configuration |
|---|---|
![]() |
![]() |
![]() |
![]() |
For using the command line tool Java 11 or higher JVM is required. It supports the following parameters:
-dir ../any/valid/directorythat specifies a directory for looking for images. Defaults to the current directory.-imageSize 200that specifies the desired profile picture size assuming 200 pixels. Defaults to 150 pixels.
The command line tool looks for any jpg, jpeg, gif and png files in the specified directory and saves the created profile pictures with a profile filename suffix and png type.
Example execution assuming Lenna.png and Mona-lisa.jpg in the /some/dir directory will create the respective Lenna_profile.png and Mona-lis_profile.png files in the same directory.
> java -jar ProfilePictureMaker-0.0.1-SNAPSHOT.jar -dir /some/dir -imageSize 200
Using parameters:
directory: /some/dir
imageSize: 200
Processing image of Lenna.png
Processing image of Mona-lisa.jpg



