ZgzInfinity / Conversimg

An open-source image converter and resizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Conversimg

An open-source image converter and resizer

Build Status License: LGPL v3 made-with-java built-with-gradle windows mac linux release

 

1 - Description

Conversimg is an open-source command interpreter program whose purpose is to allow the user to convert and resize images locally without having to resort to external services on the Internet.

2 - Supported formats

Conversimg works with the most standardized image formats. The supported formats are the following:

Version 1.0:

  • BMP (Windows bitmap).
  • JPG (Joint Photographic Experts Group).
  • GIF (Graphic Interchange Format).
  • PNG (Portable Network Graphics).

Version 2.0:

Able conversion from image to pdf and viceversa

  • From BMP, JPG, GIF, PNG to PDF
  • From PDF to jpg bmp BMP gif GIF WBMP iff IFF png PNG JPEG wbmp jpeg

More formats will be added in later versions.

3 - Source code

The application has been developed in a gradle project (version 5.6.2) in java programming language. The application has three files written in java to model the converter, the resizer and the main control module. The files are documented to make them as easy to understand as possible.

4 - How to compile

In order to compile and make use of the application you must install a gradle version on your computer. The following describes how to compile and execute the project.

  • To be able to compile the project:
gradle assemble
  • To be able to execute the unitary tests:
gradle test
  • To be able to execute the above two commands in one
gradle build

If you want to generate an executable for your system you must modify the file gradle.build and indicate the corresponding command to be able to achieve it. However, in the release a runnable jar file is provided to be executed in your personal computer.

5 - Compatibility

The application runs on the following operating systems:

  • Windows (all versions).
  • Linux (all distributions).
  • Mac.

The only requirement is to have gradle installed.

6 - Continuous integration

The application has been built, as well as its future versions using continuous integration. Travis has been used for this. The set of tasks you have to execute are in the file .travis.yml. Apart from compiling the project, a set of unit tests in java have been provided to prove that image format validation, conversion and resizing work well. In order to test the resizing and conversion of images, a folder has been provided, called Images, where four images are found in the four possible formats for now.

7 - How to execute?

Commands to run the program are shown below:

  • To convert an image to another format:
java -jar Conversimg.jar <-c> <input_image> <output_image> 

  • To resize an image:
java -jar Conversimg.jar <-r> <input_image> <output_image> <percent>
  • To convert from image to pdf
java -jar Conversimg.jar <-ip> <input_image> <output_pdf>
  • To convert from pdf to image
java -jar Conversimg.jar <-pi> <input_pdf> <out_put>

8 - Release

The relsease provided has a runnable jar file that contains all referenced dependencies and libraries. So with that file only the program runs correctly on any system where java is installed.

9 - Images of different scenaries of execution

Below are example images that show some execution scenearies of the program realised both in native windowds 10 and in a virtual machine with Debian 10.

  • The following image shows how the programm works when the order for convert an image is written correctly:

correct conversion windows

correct conversion linux

 

  • The following image shows how the programm works when the order for resize an image is written correctly:

correct resize windows

correct resize linux

 

  • The following image shows how the programm works when the order for convert an image with a not supported format:

not supported format windows

not supported format linux

 

  • The following image shows how the programm works when the order is not correct:

Incorrect flag windows

Incorrect flag linux

 

  • The following image shows how the programm works when an image is resized but the output format is changed:

bad output format changed windows

bad output format changed linux

About

An open-source image converter and resizer

License:GNU General Public License v3.0


Languages

Language:Java 100.0%