Skip to content

EditableImage

Not yet Class GUI NotCreatable

Object which allows for the runtime creation and manipulation of images.

Not implemented yet

Runtime image editing is not implemented.

0 Nova members · 18 modern Roblox members not implemented yet

Description

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:

  • Top-left: (0, 0)
  • Bottom-right: (Size.X - 1, Size.Y - 1)

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 in published games. To enable it, open the Creator Dashboard, go to the game's Configure ⟩ Settings, and toggle on Enable Mesh / Image APIs. Alternatively, in Studio, open Experience Settings and toggle on Allow Mesh / Image APIs under Security. Remember to review the Terms of Use before enabling the toggle.

Permissions

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

  • Owned by or explicitly shared with the experience owner.
  • Owned by or explicitly shared with the logged in Studio user.
  • Owned by or explicitly shared with the logged in player if the EditableImage is on the client side.
  • Owned by a group where the experience owner, Studio user, or player has a role with permission to edit the group's assets. See Roles and permissions for more information.

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.

Inheritance

Object → EditableImage

Properties

Member Signature Summary
ImageData ImageData: BinaryString —
ImageHolder ImageHolder: NetAssetRef —
IsReplicatedCopy IsReplicatedCopy: bool —
Size Size: Vector2 Size of the EditableImage in pixels.

Methods

Member Signature Summary
Destroy EditableImage:Destroy(): null Destroys the image contents and immediately reclaims the memory they use.
DrawCircle EditableImage:DrawCircle(center: Vector2, radius: int, color: Color3, transparency: float, combineType: ImageCombineType, antiAliasing: AntiAliasing = Enabled): null Draws a circle at the specified point.
DrawImage EditableImage:DrawImage(position: Vector2, image: EditableImage, combineType: ImageCombineType): null Draws another EditableImage into this EditableImage at the given position.
DrawImageProjected EditableImage:DrawImageProjected(projectionSource: Object, projection: Dictionary, brushConfig: Dictionary): null Projects another EditableImage onto a surface using an EditableMesh or prepared WrapTextureTransfer and stores the result…
DrawImageTransformed EditableImage:DrawImageTransformed(position: Vector2, scale: Vector2, rotation: float, image: EditableImage, options: Dictionary?): null Draws an image into this EditableImage with transformations including scaling and rotation, placing it at the specified position.
DrawLine EditableImage:DrawLine(p1: Vector2, p2: Vector2, color: Color3, transparency: float, combineType: ImageCombineType, antiAliasing: AntiAliasing = Enabled): null Draws a line between two provided points.
DrawRectangle EditableImage:DrawRectangle(position: Vector2, size: Vector2, color: Color3, transparency: float, combineType: ImageCombineType): null Draws a rectangle of the given size at the given top-left position.
DrawTriangle EditableImage:DrawTriangle(p1: Vector2, p2: Vector2, p3: Vector2, color: Color3, transparency: float): null —
ReadPixelsBuffer EditableImage:ReadPixelsBuffer(position: Vector2, size: Vector2): buffer Reads a rectangular region of pixels into a buffer.
SampleImageProjected EditableImage:SampleImageProjected(projectionSource: Object, sourceTexture: EditableImage, projectionConfig: Dictionary, brushConfig: Dictionary): null Projects pixels from a texture into this EditableImage using an EditableMesh or prepared WrapTextureTransfer.
WritePixelsBuffer EditableImage:WritePixelsBuffer(position: Vector2, size: Vector2, buffer: buffer): null Writes a rectangular region of pixels into the image.

Roblox reference: EditableImage

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.