Skip to content

gonutz/xcf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xcf

Package xcf is a pure Go implementation of a basic XCF (standard format used by GIMP) image file reader. It reads layers with names, visibility and opacity properties and the RGBA image data. It currently supports RGB and RGBA pixel formats.

Installation

You can go get the xcf package by typing the following command into your command line: go get github.com/gonutz/xcf

Example

package main

import (
	"fmt"
	"github.com/gonutz/xcf"
	"os"
)

func main() {
	if len(os.Args) != 2 {
		fmt.Println("please provide an XCF as the first parameter")
		return
	}

	canvas, err := xcf.LoadFromFile(os.Args[1])
	if err != nil {
		panic(err)
	}

	for _, layer := range canvas.Layers {
		fmt.Println(layer.Name, layer.Bounds())
	}
}

See the documentation for details. This document is the same as the draft.txt file included in this repo.

About

XCF image file reader (image format used by GIMP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages