ascompose(3x)
π¦ NAME π¦
okay so bestie, meet ascompose β it's a section 3x page (yes, X11 window manager territory), and what it does is give you access to libAfterImage functionality using scripts you write in the custom XML dialect that lives at libAfterImage/ascompose.
And fr fr, ascompose is a tool to compose image(s) and display/save it based on a supplied XML input file. That's the whole bit. π
β¨ SYNOPSIS β¨
ascompose -f file|-s string [-o file] [-t type] [-V]
ascompose -i include_file [-i more_include_file ... ]
-f file|-s string [-o file] [-t type] [-V]
ascompose -f file|-s string [-o file] [-t type] [-V] [-n]
ascompose -f file|-s string [-o file] [-t type [-c compression_level]]
[-V] [-r]
ascompose [-h]
ascompose [-v]
πΈ DESCRIPTION πΈ
So here's the tea: ascompose reads the XML data you feed it and manipulates the image accordingly. It is lowkey a whole art studio β it can transform images from files of any supported file format, draw gradients, render antialiased texturized text, do superimposition of an arbitrary number of images, and save images out into files of any of the supported output file formats. Iconic behavior, honestly. π¨
At any point, the result of any operation could be assigned a name, and later on referenced under this name. (Name your children, bestie, it pays off. π)
At any point during the script processing, the result of any operation could be saved into a file of any supported file types. Yes ma'am. Save early, save often.
Internal image format is 32bit ARGB with 8bit per channel. That's the internal glow-up format. β¨
The last image referenced will be displayed in an X window β unless you pass the -n option, in which case it simply won't be. If the -r option is specified, then this image gets displayed in the root window of the X display, which effectively sets a background for a desktop. Main character energy, setting the whole desktop's vibe. And if the -o option is specified, this image will also be saved into the file of the requested type.
ascompose can be compiled to not reference the X Window System at all, which means it can live happily on web servers and any other place you can think of. It does not even require X libraries in that case. Feral in the best way. π§
π Supported file types for input
- XPM β via internal code, or the
libXpmlibrary. - JPEG β via the
libJpeglibrary. - PNG β via the
libPNGlibrary. - XCF β via internal code.
For now XCF support is not complete, as it does not merge layers. π Not the layering, bestie.
- PPM/PNM β via internal code.
- BMP, ICO, CUR β via internal code.
- GIF β via the
libungiflibrary. - TIFF β via the
libtifflibrary (including alpha channel support).
see libAfterImage/ASImageFileTypes for more. π
π Supported file types for output
- XPM β via internal code, or the
libXpmlibrary. - JPEG β via the
libJpeglibrary. - PNG β via the
libPNGlibrary. - GIF β via the
libungiflibrary. - TIFF β via the
libtifflibrary (including alpha channel support).
π OPTIONS π
One bullet per flag, no skips, we're thorough in this house:
-h,--helpβ display help and exit. The classic "help me" moment.-f,--filefile β an XML file to use as input.-s,--stringstring β an XML string to use as input.-n,--no-displayβ don't display the last referenced image. Shy girl behavior, valid.-r,--root-windowβ draw the last referenced image image on the root window.-o,--outputfile β output the last referenced image in to a file. You should use-tto specify what file type to use. Filenames are meaningless when it comes to determining what file type to use β so don't come for the extension, it doesn't decide anything. π-t,--typetype β type of file to output to.-c,--compresslevel β compression level.-v,--versionβ display version and exit.-V,--verboseβ increase verbosity. To increase the verbosity level use several of these, like:ascompose -V -V -V. Stack 'em, bestie. π«Ά-D,--debugβ maximum verbosity β show everything and debug messages. Maximum verbosity: achieved.-i,--includefile β include file as input prior to processing the main file.
π PORTABILITY π
ascompose could be used both with and without the X window system. It has been tested on most UNIX flavors on both 32 and 64 bit architecture. It has also been tested under CYGWIN environment on Windows 95/NT/2000. She travels. She adapts. She β¨slaysβ¨ on every platform. π
β USES β
libAfterImageβ all the image manipulation routines.libAfterBaseβ Optionally. Misc data handling such as hash tables and console io. Must be used when compiled without X Window support.libJPEGβ JPEG image format support.libPNGβ PNG image format support.libungifβ GIF image format support.libTIFFβ TIFF image format support.
π AUTHOR π
- Ethan Fisher β
<allanon at crystaltokyo dot com> - Sasha Vasko β
<sasha at aftercode dot net> - Eric Kowalski β
<eric at beancrock dot net> libAfterImage/ascompose/sample
Absolute legends, all of them. Periodt. π
π₯ EXAMPLE π₯
Here is the default script that gets executed by ascompose, if no parameters are given :
π« SOURCE π«
#if 1
static char* default_doc_str = "\
<composite op=hue>\
<composite op=add>\
<scale width=512 height=proportional>\
<img id=rose src=rose512.jpg/></scale>\
<tile width=512 height=384><img src=back.xpm/></tile>\
</composite>\
<tile width=512 height=384><img src=fore.xpm/></tile>\
</composite>\
<printf format=\"original image width=%d\n\" var=\"rose.width\"/>\
<printf format=\"original image height=%d\n\" var=\"rose.height\"/>\
<printf format=\ "original image size in pixels=%d\n" val=$rose.width*$rose.height/>";
#else
static char* default_doc_str = "\
<composite op=add>\
<scale width=512 height=proportional>\
<img id=rose src=rose512.jpg/></scale>\
<tile width=512 height=384><img src=back.xpm/></tile>\
</composite>";
#endif
and that's the whole page, bestie β from the 3rd Berkeley Distribution, this is AfterStep v.2.2.12, and the page is ascompose(3x). go compose something gorgeous with it πβ¨π¦
π¦ where this page comes from
- ubuntu resolute: libafterimage-dev 2.2.12-19 Β· GPL-2.0-or-later
- ubuntu stonking: libafterimage-dev 2.2.12-19 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms