Skip to content
Roblox API Reference

EditableImage

Object which allows for the runtime creation and manipulation of images.
  • Not creatable
Memory category
Instances
Own members
15
Inherited members
6
Subclasses
0
Siblings
30

Properties6

Inherited fromObject2

Property categoryData

Defined byEditableImage4

Property categoryData

  • EditableImage.ImageData: string
    • Hidden
    • Not replicated
    • Not scriptable
    • Roblox engine security
    • Read capabilities: DynamicGeneration
  • EditableImage.ImageHolder: NetAssetRef
    • Hidden
    • Not scriptable
    • Roblox engine security
    • Read capabilities: DynamicGeneration
  • EditableImage.IsReplicatedCopy: boolean
    • Hidden
    • Not replicated
    • Not scriptable
    • Roblox engine security
    • Read capabilities: DynamicGeneration
  • EditableImage.Size: Vector2
    Size of the EditableImage in pixels.
    • Read only
    • Capabilities: DynamicGeneration
    • Save only

Methods14

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Defined byEditableImage11
  • EditableImage:Destroy()
    Destroys the image contents and immediately reclaims the memory they use.
    • Capabilities: DynamicGeneration
  • EditableImage:DrawCircle(center: Vector2,radius: number,color: Color3,transparency: number,combineType: Enum.ImageCombineType,antiAliasing: Enum.AntiAliasing? = Enum.AntiAliasing.Enabled,)
    Draws a circle at the specified point.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    center: Vector2
    Center of the circle, relative to the top-left corner of the EditableImage. Positions outside the canvas bounds are allowed.
    radius: number
    Radius of the circle in pixels.
    color: Color3
    Color of the circle.
    transparency: number
    Transparency of the circle with 0 being fully opaque and 1 being fully transparent.
    combineType: Enum.ImageCombineType
    How the drawn pixels (source) are combined with the existing pixels of this image (destination).
    antiAliasing: Enum.AntiAliasing? = Enum.AntiAliasing.Enabled
    Determines whether anti-aliasing is applied to the circle. When set to AntiAliasing.Enabled, circle edges are soft. When set to AntiAliasing.Disabled, circle edges are hard.
  • EditableImage:DrawImage(position: Vector2,image: EditableImage,combineType: Enum.ImageCombineType,)
    Draws another EditableImage into this EditableImage at the given position.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    position: Vector2
    Position at which the top-left corner of the source image will be drawn.
    image: EditableImage
    The source EditableImage to draw into this EditableImage.
    combineType: Enum.ImageCombineType
    How the pixels of the source image are combined with the existing pixels of this image (destination).
  • EditableImage:DrawImageProjected(projectionSource: Object,projection: { [string]: any },brushConfig: { [string]: any },)
    Projects another EditableImage into an EditableMesh and stores the result on this EditableImage.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    projectionSource: Object
    projection: { [string]: any }
    Projection configuration dictionary including the following key-value pairs:
    • Direction (Vector3) where the projector is facing.
    • Position (Vector3) as the position in local space with respect to the mesh.
    • Size (Vector3) as the size of the projector.
    • Up (Vector3) as the up vector of the projector in local space with respect to the mesh.
    brushConfig: { [string]: any }
    Brush configuration dictionary including the following key-value pairs:
    • AlphaBlendType (ImageAlphaType) which determines how this projection will blend alpha values.
    • ColorBlendType (ImageCombineType) which determines how this projection will blend color values.
    • Decal (EditableImage) as the image used for projection.
    • FadeAngle (number) as the angle in degrees for the projection edges to start to fall off. The projection will be fully faded out at 90 degrees. An angle of 0 means fading starts immediately at 0 degrees and an angle of 90 means no fading but instead a hard edge at 90 degrees. An angle of 70 degrees would mean the projection starts to fade at 70 degrees and is fully faded out at 90 degrees.
    • BlendIntensity (number) as the value between 0 and 1 which controls how much of the projection is blended into the resulting image.
  • EditableImage:DrawImageTransformed(position: Vector2,scale: Vector2,rotation: number,image: EditableImage,options: { [string]: any }?,)
    Draws an image into this EditableImage with transformations including scaling and rotation, placing it at the specified position.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    position: Vector2
    Position in pixels where the pivot point of the source image will be placed on this image.
    scale: Vector2
    Scaling factors for the source image along the X and Y axes.
    rotation: number
    The rotation angle in degrees, applied around the pivot point of the source image.
    image: EditableImage
    The source EditableImage to be drawn into this image.
    options: { [string]: any }?
    Optional dictionary for additional configuration:
    • CombineType: Specifies how the pixels of the source image blend with those of the destination. Default is ImageCombineType.AlphaBlend.
    • SamplingMode: Specifies the sampling method (e.g. Default for bilinear or Pixelated for nearest neighbor). Default is ResamplerMode.Default.
    • PivotPoint: Specifies the pivot point within the source image for scaling and rotation. Default is the center of the source image (i.e. Size / 2).
  • EditableImage:DrawLine(p1: Vector2,p2: Vector2,color: Color3,transparency: number,combineType: Enum.ImageCombineType,antiAliasing: Enum.AntiAliasing? = Enum.AntiAliasing.Enabled,)
    Draws a line between two provided points.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    p1: Vector2
    Start point of the line.
    p2: Vector2
    End point of the line.
    color: Color3
    Color of the line.
    transparency: number
    Transparency of the line.
    combineType: Enum.ImageCombineType
    How the drawn pixels (source) are combined with the existing pixels of this image (destination).
    antiAliasing: Enum.AntiAliasing? = Enum.AntiAliasing.Enabled
    Determines whether anti-aliasing is applied to the line. When set to AntiAliasing.Enabled, line edges are soft. When set to AntiAliasing.Disabled, line edges are hard.
  • EditableImage:DrawRectangle(position: Vector2,size: Vector2,color: Color3,transparency: number,combineType: Enum.ImageCombineType,)
    Draws a rectangle of the given size at the given top-left position.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    position: Vector2
    Position of the top-left of the rectangle. Unlike other drawing methods, this cannot be outside the canvas bounds of the EditableImage.
    size: Vector2
    Size of the rectangle to draw, in pixels.
    color: Color3
    Color of the rectangle.
    transparency: number
    Transparency of the rectangle.
    combineType: Enum.ImageCombineType
    How the drawn pixels (source) are combined with the existing pixels of this image (destination).
  • EditableImage:DrawTriangle(p1: Vector2,p2: Vector2,p3: Vector2,color: Color3,transparency: number,)
    • Roblox script security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    p1: Vector2
    p2: Vector2
    p3: Vector2
    color: Color3
    transparency: number
  • EditableImage:ReadPixelsBuffer(position: Vector2, size: Vector2): buffer
    Reads a rectangular region of pixels into a buffer.
    • Custom Lua state
    • Thread safe
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    position: Vector2
    Top-left corner of the rectangular region of pixels to read.
    size: Vector2
    Size of the rectangular region of pixels to read.
    Returns
    TypeDescription
    buffer
    Buffer where each pixel is represented by four bytes (red, green, blue and alpha respectively). The length of the buffer can be calculated as X * Size.Y * 4 bytes.
  • EditableImage:SampleImageProjected(projectionSource: Object,sourceTexture: EditableImage,projectionConfig: { [string]: any },brushConfig: { [string]: any },)
    Projects pixels from an EditableMesh texture into this EditableImage.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    projectionSource: Object
    sourceTexture: EditableImage
    The EditableImage from which pixels are sampled.
    projectionConfig: { [string]: any }
    Projection configuration dictionary containing the following key-value pairs:
    • Direction (Vector3) where the projector is facing.
    • Position (Vector3) as the projector position in local space with respect to the mesh.
    • Size (Vector3) as the size of the projector. The X and Y components specify its dimensions, while the Z component specifies the projection depth.
    • Up (Vector3) as the up vector of the projector in local space with respect to the mesh.
    brushConfig: { [string]: any }
    Brush configuration dictionary containing the following key-value pairs:
    • AlphaBlendType (ImageAlphaType) which determines how the sampled alpha values are blended.
    • ColorBlendType (ImageCombineType) which determines how the sampled color values are blended.
    • FadeAngle (number) as the angle in degrees at which the projection begins to fade based on the surface normal. A value of 180 applies no normal-angle fade.
  • EditableImage:WritePixelsBuffer(position: Vector2,size: Vector2,buffer: buffer,)
    Writes a rectangular region of pixels into the image.
    • Custom Lua state
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    position: Vector2
    Top-left corner of the rectangular region to draw the pixels into.
    size: Vector2
    Size of the rectangular region of pixels to write.
    buffer: buffer
    A buffer where each pixel is represented by four bytes (red, green, blue, and alpha respectively). The length of the buffer should be X * Size.Y * 4 bytes.

Events1

Inherited fromObject1