testimages

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbededImages embed.FS
View Source
var TestCases = []TestCase{
	{InputPath: "test.png", OutputPath: "test.jpg", ImageType: "png", ShouldConvert: true, WouldOverwrite: false, Err: false},
	{InputPath: "fakejpg.jpg", OutputPath: "fakejpg.jpg", ImageType: "png", ShouldConvert: true, WouldOverwrite: true, Err: false},
	{InputPath: "realjpg-portrait.jpg", OutputPath: "realjpg-portrait.jpg", ImageType: "jpeg", ShouldConvert: false, WouldOverwrite: true, Err: false},
	{InputPath: "testwebp.webp", OutputPath: "testwebp.jpg", ImageType: "webp", ShouldConvert: true, WouldOverwrite: false, Err: false},
	{InputPath: "realjpg.jpg", OutputPath: "realjpg.jpg", ImageType: "jpeg", ShouldConvert: false, WouldOverwrite: true, Err: false},
	{InputPath: "realjpg.png", OutputPath: "realjpg.png", ImageType: "png", ShouldConvert: true, WouldOverwrite: true, Err: true},
}

Functions

func MakeTestDir

func MakeTestDir(t *testing.T) string

Types

type TestCase

type TestCase struct {
	InputPath      string
	OutputPath     string
	ImageType      string
	ShouldConvert  bool
	WouldOverwrite bool
	Err            bool
}

Jump to

Keyboard shortcuts

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