switch_default_imageproc(3)

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

πŸ’… switch_default_imageproc(3) β€” the Arcan Lua API glow-up

okay so bestie, welcome to the Arcan Lua API corner of the world ✨ this is switch_default_imageproc(3) and she's literally the vibe-setter for how your images get post-processed. pull up a chair πŸŽ€


✨ NAME ✨

switch_default_imageproc β€” sets the default image post-processing mode, no cap πŸ’–


✨ SYNOPSIS ✨

nil
switch_default_imageproc( procmode )

so she hands you back nil (iconic, lowkey humble of her 🫢) and you pass in exactly one thing: procmode.


✨ DESCRIPTION ✨

this is the function you call when you want to tell everyone "hey, this is how we're doing images from now on" πŸ‘‘

the accepted values are, and I'm quoting the source of truth here:

  • IMAGEPROC_NORMAL β€” where the loaded image will be stored without any additional postprocessing. clean, unbothered, main character energy πŸ’…
  • IMAGEPROC_FLIPH β€” where the image will be flipped over the x-axis (so y- row order will be inverted). flip her upside down, she slays either way πŸ¦‹

that's it, that's the whole menu. two options, both iconic, choose wisely 🌸


✨ EXAMPLE ✨

ok so here's the little demo script, and yes I'm giving it to you character for character because she's precious:

function switch_default_imageproc0()
      switch_default_imageproc(IMAGEPROC_FLIPH);
      a = load_image("test.png");
      switch_default_imageproc(IMAGEPROC_NORMAL);
      b = load_image("test.png");
      show_image({a,b});
      local props = image_surface_properties(b);
      move_image(b, b.width, b.height);
end

see the way she flips it, loads a, sets it back to normal, loads b, shows them both, then pulls props off b and moves b? chef's kiss 😭πŸ”₯


✨ MISUSE ✨

now for the part where we learn what NOT to do πŸ™ˆ first offender:

function switch_default_imageproc0()
      switch_default_imageproc("test1");
end

yeah... a string. not it bestie πŸ’€


✨ MISUSE ✨

and the second one, because apparently we're doing a whole series:

function switch_default_imageproc1()
      switch_default_imageproc(200);
end

a raw 200. nope, we're passing those IMAGEPROC_ constants, not vibes 🌈

fr fr, stick to IMAGEPROC_NORMAL and IMAGEPROC_FLIPH and you can't go wrong ✨

and that's the page!! this lil masterpiece comes to you from vidsys, dated October 2026, and it's switch_default_imageproc(3) all the way down πŸŽ€πŸ’œ go forth and process those images, bestie πŸ‘‘

πŸ“¦ where this page comes from