Giter VIP home page Giter VIP logo

simge's Introduction

SIMPLE IMAGE EDITOR

Simple image editor (simge) is a program which provides images editing, manipulating and filtering. Program has been written in C language. However for image compression and decompression purposes some python code has been used.

Requirements

Program requires incoming dependencies:

  • linux operating system with gcc compiler (e.g. windows subsytem for linux),
  • python 3.8 with python3.8-dev package installed,
  • python Pillow library.

Instalation

To install simge on Debian based distro run install.sh file with super-user privilages. If you want install dependencies manually (e.g. in python venv) run compile.sh script which only compiles simge - then install remaining dependencies manually.

Usage

General command structure to run simge is simge [options]... <file_in> <file_out>.
Output file extension must be specified to let simge know which image compression alghoritm use for output file. Running simge without options decompress input file and then compress data with compression alghoritm specified by extension into output file.

Options

Options order is relevant. For example running simge with options -r180 -p100,100,200,200 (rotate then crop) is not equivalent to running program with options -p100,100,200,200 -r180 (crop then rotate).

Option Argument Argument values Decription
--rotate (-r) angle {90, 180, 270} Rotates image by angle.
--mirror (-m) axis {x, y} Mirrors image to the axis.
--symmetric (-s) side {l, u, r, d} Reflects image side symmetric.
--resize (-n) dimension 'new_width[,new_height]' Resizes image. Resizes both sides with new_width if new_height is not given.
--crop (-p) coordinates 'start_x,start_y,final_x,final_y' Crops image.
--binary (-b) method {n, r} Converts image to binary.
--grayscale (-g) - - Converts image to grayscale.
--sepiascale (-e) - - Converts image to sepiascale.
--switch (-w) channels '---', where each '-' in {R, G, B, 0} Switch or disable image's RGB channels.
--lightness (-l) value <-255, 255> Sets image lightness.
--contrast (-c) value <0, 360> Sets image contrast.

Some of options argument's values has other equivalent values (e.g. {l, u, r, d} == {left, up, right, down}). Using that values is supported by simge. All of these values can be found in main.c file.

Examples

Input image:
input image

Command Output
simge -r180 -g ex/lenna.jpg ex/lenna_r180_g.jpg input image
simge -sr -wGBR ex/lenna.jpg ex/lenna_sr_wgbr.jpg input image
simge -c250 -n300 ex/lenna.jpg ex/lenna_c250_n300.jpg input image
simge -l-100 -p20,20,150,200 ex/lenna.jpg ex/lenna_l-100_p20,20,150,200.jpg input image

simge's People

Contributors

kuna728 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.