Preparing search index...

    Class ImageUploadOptions

    Provides configuration options for uploading images via RemoteMediaModule.uploadImage. Allows setting the compression method, compression quality, and whether to include alpha channel.

    // @input Asset.RemoteMediaModule remoteMediaModule
    // @input Asset.Texture texture

    var uploadOptions = ImageUploadOptions.create();
    uploadOptions.compressionMethod = ImageUploadCompressionMethod.JPG;
    uploadOptions.compressionQuality = CompressionQualityLevel.HighQuality;
    // Note: Set includeAlpha last to avoid conflicts with compressionMethod.
    // Alpha is not supported for JPG comrpession.
    uploadOptions.includeAlpha = false;

    script.remoteMediaModule.uploadImage(
    script.texture,
    function(resource) {
    print("Image uploaded successfully");
    },
    function(error) {
    print("Upload failed: " + error);
    },
    uploadOptions
    );

    Hierarchy (View Summary)

    Index

    Properties

    compressionMethod: ImageUploadCompressionMethod

    The compression method (image format) to use when encoding the image. Defaults to JPG.

    compressionQuality: CompressionQuality

    The compression quality level to use when encoding the image. Defaults to MaximumQuality.

    includeAlpha: boolean

    Whether to include the alpha channel in the uploaded image. Defaults to false. Note: This property must be set after compressionMethod to avoid conflicts. Alpha channel is not supported for JPG format.

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean