image_resize_storage(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

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 πŸŽ€

  1. There is no guarantee that the change can be performed, because some platforms may impose alignment and padding requirements. Vibe check your platform, bestie. 😭
  2. 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