png2j

package module
v0.1.2-beta Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

README

png2j

Convert PNG to JPG GO library

Description

png2j is a Go library to convert PNG to JPG.

Usage

```go
package main

import "github.com/ser163/png2j"

func main() {
   // Convert PNG to JPG
    err := png2j.Con2jpg("./image/go.png", "./image/go.png.jpg")
    if err != nil {
        panic(err)
    }
    // Resize JPG image
    err := png2j.ReSizeImage("./image/go.png.jpg", 948, 418, "./image/go_big.png.jpg")
    if err != nil {
        panic(err)
    }
}
```

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Con2jpg

func Con2jpg(src string, dst string) (err error)

Con2jpg Convert PNG to JPG

func ConBase

func ConBase(src string, dst string, bgColor color.Color, quality int) (err error)

ConBase Transforming the base method

func ReSizeImage

func ReSizeImage(srcFile string, width uint, height uint, destFile string) error

resizeImage Resize image

Types

This section is empty.

Jump to

Keyboard shortcuts

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