docs.unity3d.com
    Show / Hide Table of Contents

    Class JpegEncoder

    Inheritance
    Object
    JpegEncoder
    Namespace: Global Namespace
    Syntax
    public class JpegEncoder

    Methods

    Decode(Byte[], ref Int32, ref Int32)

    Declaration
    public static byte[] Decode(byte[] jpg, ref int width, ref int height)
    Parameters
    Type Name Description
    Byte[] jpg
    Int32 width
    Int32 height
    Returns
    Type Description
    Byte[]

    Encode(Byte[], Int32, Int32, Int32, GraphicsFormat, Int32, JpegEncoder.Flags)

    Declaration
    public static byte[] Encode(byte[] raw, int width, int height, int pixelSize, GraphicsFormat textureFormat, int quality = 75, JpegEncoder.Flags flags = JpegEncoder.Flags.TJ_BOTTOMUP)
    Parameters
    Type Name Description
    Byte[] raw
    Int32 width
    Int32 height
    Int32 pixelSize
    GraphicsFormat textureFormat
    Int32 quality
    JpegEncoder.Flags flags
    Returns
    Type Description
    Byte[]
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023