image_resize_storage(3)
hey bestie π you're reading image_resize_storage(3) from the Arcan Lua API, and it's literally the page for resizing the dimensions of the image backing store. Group-chat recap time, but make it precise. β¨
πΈ NAME πΈ
image_resize_storage β resize the dimensions of the image backing store.
β¨ SYNOPSIS β¨
It returns nil, and the signatures are:
nil
image_resize_storage( vid:tgt, int:neww, int:newh )
image_resize_storage( vid:tgt, int:neww, int:newh, int:vieww, int:viewh,
int:viewx, int:viewy )
π¦ DESCRIPTION π¦
So this function is intended for testing streaming transfers and for rendertargets where you may need to permanently or temporarily change backing storage dimensions β both to save memory and to deal with rendertarget resize without rebuilding attachment chains. Iconic use case, honestly. π
The longer argument form, with vieww, viewh, viewx, and viewy, redefines the window coordinate system range from 0,0,neww,newh to viewx,viewy,viewx+vieww,viewy+viewh. Literally that. This can be used together with define_linktarget in order to have two different views of the same pipeline. Two views, one pipeline β main character energy. π«Ά
π NOTES π
- There is no guarantee that the change can be performed, because some platforms may impose alignment and padding requirements. Vibe check your platform, bestie. π
- The underlying code-path is similar to the resized event for a frameserver, but without the event being emitted. No alert is raised if the change could not be performed due to video hardware issues or memory constraints. Silent-fail energy β not the cute kind. π
π EXAMPLE π
No cap, here's the example exactly as it is:
function image_resize_storage0()
local surf = alloc_surface(640, 480);
local props = image_storage_properties(surf);
print(props.width, props.height);
image_resize_storage(surf, 320, 240);
props = image_storage_properties(surf);
print(props.width, props.height);
end
π«Ά SEE ALSO: π«Ά
image
mwah π this page is from the image source/version, dated October 2026, and it's image_resize_storage(3) signing off β slay responsibly! π
β¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms