Skip to content

geekori/new_craft

Repository files navigation

PixelCraft

Go Report Card Build Status Coverage Status License: MIT

PixelCraft is a modern, high-performance Go library for image manipulation and processing. It provides a clean and expressive API to create, edit, and compose images, inspired by the simplicity of libraries like Intervention Image but reimagined for the Go ecosystem.

Features

  • Fluent Interface: Chain methods for clean and readable image processing pipelines.
  • Extensive Operations: Supports resizing, cropping, rotating, watermarking, and more.
  • Powerful Filtering: A rich set of image filters like grayscale, blur, sharpen, and sepia.
  • Format Support: Encode and decode various image formats including JPEG, PNG, GIF, and BMP.
  • Framework Agnostic: Usable in any Go project, from web services to command-line tools.
  • High Performance: Built with performance in mind, leveraging Go's concurrency.

Installation

To install PixelCraft, use go get:

go get -u [github.com/your-username/pixel-craft](https://github.com/your-username/pixel-craft)

Usage

Here is a quick example of how to resize an image and apply a grayscale filter.

package main

import (
    "log"
    "[github.com/your-username/pixel-craft/pkg/image](https://github.com/your-username/pixel-craft/pkg/image)"
)

func main() {
    img, err := image.Open("path/to/your/image.jpg")
    if err != nil {
        log.Fatalf("Failed to open image: %v", err)
    }

    // Resize the image to a width of 800px, maintaining aspect ratio.
    // Then, apply a grayscale filter and save the result.
    err = img.Resize(800, 0).
        Filter("grayscale").
        Save("path/to/your/output.jpg")

    if err != nil {
        log.Fatalf("Failed to process and save image: %v", err)
    }
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A new project named new_craft, pushed via Go program.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published