C# 클래스 TinyPng.TinyPngClient

상속: IDisposable
파일 보기 프로젝트 열기: ctolkien/TinyPNG

공개 프로퍼티들

프로퍼티 타입 설명
httpClient System.Net.Http.HttpClient

공개 메소드들

메소드 설명
Compress ( Stream data ) : Task

Compress stream

Compress ( byte data ) : Task

Compress byte array of image

Compress ( string pathToFile ) : Task

Compress file

Dispose ( ) : void
Download ( TinyPngCompressResponse result ) : Task
Resize ( TinyPngCompressResponse result, ResizeOperation resizeOperation ) : Task

Uses the TinyPng API to create a resized version of your uploaded image.

Resize ( TinyPngCompressResponse result, int width, int height, ResizeType resizeType = ResizeType.Fit ) : Task

Uses the TinyPng API to create a resized version of your uploaded image.

SaveCompressedImageToAmazonS3 ( TinyPngCompressResponse result, AmazonS3Configuration amazonSettings, string path ) : Task

Stores a previously compressed image directly into Amazon S3 storage

SaveCompressedImageToAmazonS3 ( TinyPngCompressResponse result, string path, string bucketOverride = "", string regionOverride = "" ) : Task

Stores a previously compressed image directly into Amazon S3 storage

TinyPngClient ( string apiKey ) : System

Wrapper for the tinypng.com API

TinyPngClient ( string apiKey, AmazonS3Configuration amazonConfiguration ) : System

Wrapper for the tinypng.com API

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
CreateContent ( Stream source ) : HttpContent
CreateContent ( byte source ) : HttpContent

메소드 상세

Compress() 공개 메소드

Compress stream
public Compress ( Stream data ) : Task
data Stream
리턴 Task

Compress() 공개 메소드

Compress byte array of image
public Compress ( byte data ) : Task
data byte Byte array of the data to compress
리턴 Task

Compress() 공개 메소드

Compress file
public Compress ( string pathToFile ) : Task
pathToFile string Path to file on disk
리턴 Task

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

Download() 공개 메소드

public Download ( TinyPngCompressResponse result ) : Task
result TinyPng.Responses.TinyPngCompressResponse
리턴 Task

Resize() 공개 메소드

Uses the TinyPng API to create a resized version of your uploaded image.
public Resize ( TinyPngCompressResponse result, ResizeOperation resizeOperation ) : Task
result TinyPng.Responses.TinyPngCompressResponse This is the previous result of running a compression
resizeOperation ResizeOperation Supply a strongly typed Resize Operation. See , , ,
리턴 Task

Resize() 공개 메소드

Uses the TinyPng API to create a resized version of your uploaded image.
public Resize ( TinyPngCompressResponse result, int width, int height, ResizeType resizeType = ResizeType.Fit ) : Task
result TinyPng.Responses.TinyPngCompressResponse This is the previous result of running a compression
width int
height int
resizeType ResizeType
리턴 Task

SaveCompressedImageToAmazonS3() 공개 메소드

Stores a previously compressed image directly into Amazon S3 storage
public SaveCompressedImageToAmazonS3 ( TinyPngCompressResponse result, AmazonS3Configuration amazonSettings, string path ) : Task
result TinyPng.Responses.TinyPngCompressResponse The previously compressed image
amazonSettings AmazonS3Configuration The settings for the amazon connection
path string The path and bucket to store in: bucket/file.png format
리턴 Task

SaveCompressedImageToAmazonS3() 공개 메소드

Stores a previously compressed image directly into Amazon S3 storage
public SaveCompressedImageToAmazonS3 ( TinyPngCompressResponse result, string path, string bucketOverride = "", string regionOverride = "" ) : Task
result TinyPng.Responses.TinyPngCompressResponse The previously compressed image
path string The path to storage the image as
bucketOverride string Optional: To override the previously configured bucket
regionOverride string Optional: To override the previously configured region
리턴 Task

TinyPngClient() 공개 메소드

Wrapper for the tinypng.com API
public TinyPngClient ( string apiKey ) : System
apiKey string Your tinypng.com API key, signup here: https://tinypng.com/developers
리턴 System

TinyPngClient() 공개 메소드

Wrapper for the tinypng.com API
public TinyPngClient ( string apiKey, AmazonS3Configuration amazonConfiguration ) : System
apiKey string Your tinypng.com API key, signup here: https://tinypng.com/developers
amazonConfiguration AmazonS3Configuration Configures defaults to use for storing images on Amazon S3
리턴 System

프로퍼티 상세

httpClient 공개적으로 프로퍼티

public HttpClient,System.Net.Http httpClient
리턴 System.Net.Http.HttpClient