Performance improvements and memory optimisations for CanvasDraw.GetImageData() and CanvasDraw.GetImageDataFromTextureId()
The CanvasDraw.GetImageDataFromTextureId() method has been updated to support any asset based errors as this method can no longer guarantee a returned ImageData due to new EditableImage API changes and limiations. This method will also no longer work on assets that you do not own.
New SaveObject Format - Resolution Increased
CanvasDraw SaveObjects have a new chunk-based format which has allowed me to increase the resolution limit from 256x256 to 1024x1024 pixels!
The CanvasDraw Tools plugin has also been updated to support this new limit and format
PLEASE NOTE:
1024x1024 is a very large image to compress and decompress. In most use cases, you donāt even need anything higher than 512x512.
At a resolution this high;
Importing SaveObjects may freeze your client for a few seconds.
Storing a lot of these large SaveObjects may impact your place file size.
Calling CanvasDraw.GetImageData(SaveObject) will normally freeze your client for a second second. A new parameter has been added to this method (SlowLoad) which avoids this problem.
Setting this parameter to true will yield your code and slowly decompress large SaveObjects to avoid freezing the client.
For an alternative, you can also use roblox images and call CanvasDraw.GetImageDataFromTextureId(TextureId) instead, which avoids decompression and doesnāt take up storage space.
Hereās the full change log:
Module Changes:
Increased SaveObject resolution read limit from 256x256 to 1024x1024
Added Canvas:GetBuffer() and Canvas:SetBuffer()
Added SlowLoad parameter to CanvasDraw.GetImageData()
Fixed module and plugin to support the new EditableImage workflow changes
Performance improvements and memory optimisations for CanvasDraw.GetImageData() and CanvasDraw.GetImageDataFromTextureId()
Plugin Changes:
Increased the SaveObject Importer resolution limit from 256x256 to 1024x1024
Increased the Image Editor resolution limit from 256x256 to 1024x1024
Hey all. This release fixes a couple issues and also adds custom defined documentation for the module when using the script editor
Changelog:
Fixed CanvasDraw.new() āParentā parameter not working on non-gui instances
Canvases can no longer be parented to Decal, Texture and SurfaceAppereance due to new EditableImage limitations. However, MeshPart and GuiObject are still supported and Decal/texture support should hopefully be back sometime soon.
Added Canvas:GetBuffer()
Added documentation for all module functions and methods.