image_surface_initial(3)

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

πŸ’– 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