peicon

package module
v0.0.0-...-18436f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2019 License: MIT Imports: 4 Imported by: 0

README

peicon

Read & Write PE file icons.

package main

import (
	"io/ioutil"

	"github.com/faceair/peicon"
)

func main() {
	f, err := peicon.Open("logo.exe")
	if err != nil {
		panic(err)
	}

	iconData, err := f.Icon()
	if err != nil {
		panic(err)
	}

	err = ioutil.WriteFile("logo.ico", iconData, 0644)
	if err != nil {
		panic(err)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func New

func New(r io.ReaderAt) (*File, error)

func Open

func Open(name string) (*File, error)

func (*File) Icon

func (f *File) Icon() ([]byte, error)

type ResourceType

type ResourceType uint32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL