image_helper

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Android = "_android"
View Source
const Ios = "_ios"

Variables

View Source
var IconResized = []ResizeImage{

	{
		"/" + Ios + "/", "Icon_20pt@1_20x20", 20, 20,
	},
	{
		"/" + Ios + "/", "Icon_20pt@2_40x40", 40, 40,
	},
	{
		"/" + Ios + "/", "Icon_20pt@3_60x60", 60, 60,
	},

	{
		"/" + Ios + "/", "Icon_29pt@1_29x29", 29, 29,
	},
	{
		"/" + Ios + "/", "Icon_29pt@2_58x58", 58, 58,
	},
	{
		"/" + Ios + "/", "Icon_29pt@3_87x87", 87, 87,
	},

	{
		"/" + Ios + "/", "Icon_40pt@1_40x40", 40, 40,
	},
	{
		"/" + Ios + "/", "Icon_40pt@2_80x80", 80, 80,
	},
	{
		"/" + Ios + "/", "Icon_40pt@3_120x120", 120, 120,
	},

	{
		"/" + Ios + "/", "Icon_50pt@1_50x50", 50, 50,
	},
	{
		"/" + Ios + "/", "Icon_50pt@2_100x100", 100, 100,
	},

	{
		"/" + Ios + "/", "Icon_57pt@1_57x57", 57, 57,
	},
	{
		"/" + Ios + "/", "Icon_57pt@2_114x114", 114, 114,
	},

	{
		"/" + Ios + "/", "Icon_60pt@2_120x120", 120, 120,
	},
	{
		"/" + Ios + "/", "Icon_60pt@3_180x180", 180, 180,
	},

	{
		"/" + Ios + "/", "Icon_72pt@1_72x72", 72, 72,
	},
	{
		"/" + Ios + "/", "Icon_72pt@2_144x144", 144, 144,
	},

	{
		"/" + Ios + "/", "Icon_76pt@1_76x76", 76, 76,
	},
	{
		"/" + Ios + "/", "Icon_76pt@2_152x152", 152, 152,
	},

	{
		"/" + Ios + "/", "Icon_83.5pt@2_167x167", 167, 167,
	},

	{
		"/" + Ios + "/", "_AppIcon_1024x1024", 1024, 1024,
	},

	{
		"/" + Android + "/mipmap-ldpi_36x36/", "ic_launcher", 36, 36,
	},
	{
		"/" + Android + "/mipmap-mdpi_48x48/", "ic_launcher", 48, 48,
	},
	{
		"/" + Android + "/mipmap-hdpi_72x72/", "ic_launcher", 72, 72,
	},
	{
		"/" + Android + "/mipmap-xhdpi_96x96/", "ic_launcher", 96, 96,
	},
	{
		"/" + Android + "/mipmap-xxhdpi_144x144/", "ic_launcher", 144, 144,
	},
	{
		"/" + Android + "/mipmap-xxxhdpi_192x192/", "ic_launcher", 192, 192,
	},

	{
		"/" + Android + "/", "_AppIcon_512x512", 512, 512,
	},
}

Functions

This section is empty.

Types

type File

type File struct {
	Name      string
	Extension string
}

type MyImage

type MyImage struct {
	Image image.Image
	File  File
}

func NewMyImageFromBase64

func NewMyImageFromBase64(base64String string, name string, extension string) (*MyImage, error)

func (MyImage) SaveInSize

func (m MyImage) SaveInSize(path string, width uint, height uint) error

func (MyImage) Upload

func (m MyImage) Upload() (string, error)

type ResizeImage

type ResizeImage struct {
	Path   string
	Name   string
	Width  uint
	Height uint
}

Jump to

Keyboard shortcuts

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