imager

package
v2.0.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2016 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package imager handles image, video, etc. upload requests and processing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeallocateImage

func DeallocateImage(id string) error

DeallocateImage decrements the image's refference counter. If the counter would become zero, the image entry is immediately deleted allong with its file assets.

func FindImageThumb

func FindImageThumb(hash string) (img types.Image, err error)

FindImageThumb searches for an existing image with the specified hash and returns it, if it exists. Otherwise, returns an empty struct. To ensure the image is not deallocated by another theread/process, the refference counter of the image will be incremented. If a successfull allocattion is not performed, call UnreferenceImage() on this image, to avoid possible dangling images.

func InitImager

func InitImager() error

InitImager applies the thumbnail quality configuration

func NewImageUpload

func NewImageUpload(res http.ResponseWriter, req *http.Request)

NewImageUpload handles the clients' image (or other file) upload request

Types

This section is empty.

Jump to

Keyboard shortcuts

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