11 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

EditableImage

Inherits from: Object

EditableImage allows for the runtime creation and manipulation of images.

To create a blank EditableImage, use AssetService:CreateEditableImage(). To create an EditableImage from an existing image, use AssetService:CreateEditableImageAsync().

EditableImage can be used in any Content property which takes an image, such as ImageLabel.ImageContent or MeshPart.TextureContent. This is done by setting the content property to Content.fromObject(editableImage).

The EditableImage coordinate system is relative to the top left of the image:

When you use AssetService:PromptCreatePlatformContentAsync() to publish an object that has a Content property which references an EditableImage, the editable image is published as an image and the property is set to a new asset ID.

Update Limitations

Only a single EditableImage can be updated per frame on the display side. For example, if you update three EditableImage objects which are currently being displayed, it will take three frames for all of them to be updated.

Enabling for Published Experiences

For security purposes, using EditableImage fails by default for published experiences. To enable usage, you must be 13+ age verified and ID verified. After you are verified, open the Creator Dashboard and toggle on Enable Mesh / Image APIs.

Permissions

To prevent misuse, AssetService:CreateEditableImageAsync() only allows you to load and edit image assets if any of the following is true:

See Grant permissions to learn how to share assets with users or groups.

The APIs throw an error if they are used to load an asset that does not meet the criteria above.

Memory Limits

Editable assets are currently expensive for memory usage. To minimize its impact on client performance, EditableImage has strict client-side memory budgets, although the server, Studio, and plugins operate with unlimited memory. Linking one EditableImage to multiple image-related Content data types (multi-referencing) can help with memory optimization.

Inherits from: Object

Memory category: Instances

Tags: NotCreatable

Properties

NameType / ReturnsDescription
EditableImage.SizeVector2Size of the EditableImage in pixels.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

EditableImage.Size

Size of the EditableImage in pixels. The maximum size is 1024×1024. An EditableImage cannot be resized; this property is read-only. In order to resize or crop an image, create a new EditableImage and use DrawImageTransformed() to transfer the contents; then call Destroy().

FieldValue
typeVector2
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":true}
capabilities["DynamicGeneration"]

Methods

NameType / ReturnsDescription
EditableImage:Destroy()Destroys the image contents and immediately reclaims the memory they use.
EditableImage:DrawCircle()Draws a circle at the specified point.
EditableImage:DrawImage()Draws another EditableImage into this EditableImage at the given position.
EditableImage:DrawImageProjected()Projects another EditableImage into an EditableMesh and stores the result on this EditableImage.
EditableImage:SampleImageProjected()Projects pixels from an EditableMesh texture into this EditableImage.
EditableImage:DrawImageTransformed()Draws an image into this EditableImage with transformations including scaling and rotation, placing it at the specified position.
EditableImage:DrawLine()Draws a line between two provided points.
EditableImage:DrawRectangle()Draws a rectangle of the given size at the given top-left position.
EditableImage:ReadPixelsBufferbufferReads a rectangular region of pixels into a buffer.
EditableImage:WritePixelsBuffer()Writes a rectangular region of pixels into the image.

Inherited from Object

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

EditableImage:Destroy

Destroys the contents of the image, immediately reclaiming used memory.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

EditableImage:DrawCircle

Draws a circle at the specified point on the EditableImage. If the circle is semi-transparent, it will be blended with the pixels behind it using source over blending.

Parameters

NameTypeDefaultDescription
centerVector2Center of the circle, relative to the top-left corner of the EditableImage. Positions outside the canvas bounds are allowed.
radiusintRadius of the circle in pixels.
colorColor3Color of the circle.
transparencyfloatTransparency of the circle with 0 being fully opaque and 1 being fully transparent.
combineTypeImageCombineTypeHow the drawn pixels (source) are combined with the existing pixels of this image (destination).
antiAliasingAntiAliasingEnabledDetermines 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.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

EditableImage:DrawImage

Draws another EditableImage into this EditableImage at the given position. Positions outside the canvas bounds are allowed such that only part of the new image is drawn.

Parameters

NameTypeDefaultDescription
positionVector2Position at which the top-left corner of the source image will be drawn.
imageEditableImageThe source EditableImage to draw into this EditableImage.
combineTypeImageCombineTypeHow the pixels of the source image are combined with the existing pixels of this image (destination).

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

EditableImage:DrawImageProjected

Projects another EditableImage into an EditableMesh and stores the result on this EditableImage by using the specified projection and brush configuration.

Parameters

NameTypeDefaultDescription
meshObjectThe EditableMesh used to project into.
projectionDictionaryProjection 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.
brushConfigDictionaryBrush 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.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

EditableImage:SampleImageProjected

Projects the pixels in sourceTexture, using the UV mapping of sourceMesh, onto this EditableImage. This is the inverse of DrawImageProjected(): it reads from the mesh texture and writes the sampled pixels into this image in place.

Only mesh surfaces facing the projector and within the projection volume are sampled. When multiple mesh surfaces project to the same destination pixel, the closest surface is used. This makes the method suitable for sampling a brush-sized region, modifying it in place, and then using DrawImageProjected() to write it back onto a texture.

Parameters

NameTypeDefaultDescription
sourceMeshObjectThe EditableMesh that maps sourceTexture onto the surface being sampled.
sourceTextureEditableImageThe EditableImage from which pixels are sampled.
projectionConfigDictionaryProjection 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.
brushConfigDictionaryBrush 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.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

EditableImage:DrawImageTransformed

This method lets you draw an EditableImage into this EditableImage with transformations applied, such as scaling and rotation. The position parameter specifies where the pivot point of the source image will be placed on this image after transformations. Positions outside the canvas bounds are allowed such that only part of the new image is drawn.

Parameters

NameTypeDefaultDescription
positionVector2Position in pixels where the pivot point of the source image will be placed on this image.
scaleVector2Scaling factors for the source image along the X and Y axes.
rotationfloatThe rotation angle in degrees, applied around the pivot point of the source image.
imageEditableImageThe source EditableImage to be drawn into this image.
optionsDictionary?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. Image.Size / 2).

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

Code samples: View on Creator Hub (EditableImage-DrawImageTransformed, EditableImage-DrawImageTransformed-Crop).

EditableImage:DrawLine

Draws a line on the EditableImage one pixel thick between the two provided points.

Parameters

NameTypeDefaultDescription
p1Vector2Start point of the line.
p2Vector2End point of the line.
colorColor3Color of the line.
transparencyfloatTransparency of the line.
combineTypeImageCombineTypeHow the drawn pixels (source) are combined with the existing pixels of this image (destination).
antiAliasingAntiAliasingEnabledDetermines 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.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

EditableImage:DrawRectangle

Draws a rectangle on the EditableImage of the given size at the given top-left position.

Parameters

NameTypeDefaultDescription
positionVector2Position of the top-left of the rectangle. Unlike other drawing methods, this cannot be outside the canvas bounds of the EditableImage.
sizeVector2Size of the rectangle to draw, in pixels.
colorColor3Color of the rectangle.
transparencyfloatTransparency of the rectangle.
combineTypeImageCombineTypeHow the drawn pixels (source) are combined with the existing pixels of this image (destination).

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

EditableImage:ReadPixelsBuffer

Reads a rectangular region of pixels from an EditableImage and returns it as a buffer. Each number in the buffer is a single byte, with pixels stored in a sequence of four bytes (red, green, blue, and alpha).

Note that this method uses alpha instead of transparency, unlike the EditableImage drawing methods.

Parameters

NameTypeDefaultDescription
positionVector2Top-left corner of the rectangular region of pixels to read.
sizeVector2Size of the rectangular region of pixels to read.

Returns

TypeDescription
bufferBuffer where each pixel is represented by four bytes (red, green, blue and alpha respectively). The length of the buffer can be calculated as Size.X * Size.Y * 4 bytes.
FieldValue
tags["CustomLuaState"]
securityNone
thread safetySafe
capabilities["DynamicGeneration"]

Code samples: View on Creator Hub (EditableImage-ReadPixels1).

EditableImage:WritePixelsBuffer

Writes a rectangular region of pixels to an EditableImage from a buffer. Each number in the buffer is a single byte, with pixels stored in a sequence of four bytes (red, green, blue, and alpha).

Note that this method uses alpha instead of transparency, unlike the EditableImage drawing methods.

Parameters

NameTypeDefaultDescription
positionVector2Top-left corner of the rectangular region to draw the pixels into.
sizeVector2Size of the rectangular region of pixels to write.
bufferbufferA buffer where each pixel is represented by four bytes (red, green, blue, and alpha respectively). The length of the buffer should be Size.X * Size.Y * 4 bytes.

Returns

TypeDescription
()
FieldValue
tags["CustomLuaState"]
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

Code samples: View on Creator Hub (EditableImage-ReadPixelsWritePixels1).

Events

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.