C# 클래스 Imazen.LightResize.SinglePurposeResize

This implementation of image resizing sacrifices 30-50% performance for simplicty. It only supports max-constraints resizing, jpeg encoding, and stream->stream processing.
파일 보기 프로젝트 열기: imazen/lightresize

공개 메소드들

메소드 설명
Resize ( Stream s, Stream target, int maxwidth, int maxheight, int jpegQuality = 90 ) : void

Less efficient than LightResize, and cannot resize files in place. Caller MUST ensure the first stream is disposed if the second stream fails to open. I.e, place first stream in using(){} clause, and open the second stream inside it before calling Resize()

비공개 메소드들

메소드 설명
RenderAndEncode ( Bitmap b, Size targetSize, Stream target, int jpegQuality ) : void

Resizes the provided bitmap to the given target size and writes it to the target stream with jpeg encoding. Warning: Does NOT dispose the source bitmap, source stream, or target stream!

메소드 상세

Resize() 공개 정적인 메소드

Less efficient than LightResize, and cannot resize files in place. Caller MUST ensure the first stream is disposed if the second stream fails to open. I.e, place first stream in using(){} clause, and open the second stream inside it before calling Resize()
public static Resize ( Stream s, Stream target, int maxwidth, int maxheight, int jpegQuality = 90 ) : void
s Stream
target Stream
maxwidth int
maxheight int
jpegQuality int
리턴 void