Git Product home page Git Product logo

image-editor-c's Introduction

C Image Editor

I developed a Netpbm image editor during my first year at university, which did not rely on the predefined libnetpbm library. Instead, I used only basic C libraries to implement the program. The application receives commands from the command-line, and can perform a variety of operations on PPM and PGM images, both as plain text (ASCII) and binary files.

TYPE ASCII BINARY COLORS
GRAYSCALE P2 P5 0 - 255 (black & white shade)
RGB P3 P6 16.777.216 (RGB)

How to Use Example

These are commands typed by the user
LOAD test_file
Loaded test_file
SELECT 0 1 8 10
Selected 0 1 8 10
CROP
Image cropped
SAVE my_binary_file
Saved my_binary_file
LOAD non_existent_file
Failed to load non_existent_file
LOAD color_file
Loaded color_file
GRAYSCALE
Grayscale filter applied
SEPIA
Sepia filter not available
SAVE my_plain_file ascii
Saved my_plain_file
EXIT

Generate Own Image

To generate your own PNM and PGM files, use the "convert" utility that converts png / jpeg / jpg files to these formats:
• Setup:
$ sudo apt update
$ sudo apt-get install build-essential
$ sudo apt-get install imagemagick

• Documentation: man convert
• Examples:
convert foo.jpg foo.ppm (transforms foo.jpg în foo.ppm, binary RGB)
convert foo.jpg foo.pgm (transforms foo.jpg în foo.pgm, binary grayscale)
convert foo.jpg -compress None foo.ppm (transforms foo.jpg în foo.ppm, ASCII RGB)
convert foo.jpg -compress None foo.pgm transforms foo.jpg în foo.ppm, ASCII grayscale)

image-editor-c's People

Contributors

eduardspirache avatar

Stargazers

Sadat Arefin Rafat 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.