image_surface_initial(3)
π image_surface_initial(3) π
okay bestie, welcome to the Arcan Lua API β this one's all about peeking at a surface's original self before anyone messed with it. π«Ά
β¨ NAME β¨
image_surface_initial β retrieves a table describing the initial storage state for the object you point at. literally the "before" pic. πΈ
πΈ SYNOPSIS πΈ
proptbl
image_surface_initial( vid )
π¦ DESCRIPTION π¦
so here's the vibe check π β the system lowkey keeps two separate timelines for your object: the transformations applied after it was created</>, and its initial state</> at the moment of creation. these are NOT the same thing, and that's the whole point.
this function grabs the values hanging out in that initial state and hands them back to you as a property table. that's it. that's the function. slay. π
π EXAMPLE π
fr fr, here's how you'd actually use it β load an image, resize the poor thing, then compare where it started vs. where it's at now:
function image_surface_initial0()
a = load_image("test.png");
resize_image(a, 32, 32);
iprop = image_surface_initial(a);
cprop = image_surface_properties(a);
print(string.format("initial_w: %d, inital_h: %d, current_w: %d, current_h: %d",
iprop.width, iprop.height, cprop.width, cprop.height));
end
the way this eats π₯ β image_surface_initial gives you the cute original width/height, and image_surface_properties gives you the current ones. past self vs. present self, iconic duality. β¨
β SEE ALSO β
π reminder: those two are your besties for this β one resolves the surface, one tells you what it looks like now. don't mix up your timelines, iykyk.
k bye bestie!! π this page is from the image manual, Arcan Lua API, dated October 2026 β go forth and inspect your surfaces 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