Image Tags
The following commands / statements are valid:
load <url> <imageName>
- Loads the given URL and saves it as imageName
screenshot <url> <imageName>
- Screenshots the given URL and saves it as imageName
resize <imageName> <width> <height>
- Resizes the given image to the given width and height
contain <imageName> <width> <height>
- Resizes the given image to be contained in the given dimensions, preserving its aspect ratio
cover <imageName> <width> <height>
- Resizes the given image to cover the given dimensions, preserving its aspect ratio
fit <imageName> <width> <height>
- Resizes the given image to be contained in the given dimensions without changing its bounding box aspect ratio
rotate <imageName> <degrees (0 - 360)> [rescale = true]
- Rotates the given images by the given rotation
overlay <imageName> <overlayName> <x> <y>
- Overlays the overlay image onto the given image at the given coordinates
explode <imageName>
- Explodes the image
implode <imageName>
- Implodes the image
magik <imageName> [iterations (1 - 10) = 1] [rescale = false]
- Applies magik to the given image with the given iterations/delta
jpeg <imageName> <quality (1 - 100)>
- JPEG-ifies the given image with the given quality
brightness <imageName> <brightness (-100 - 100)>
- Modifies the given images brightness by the given value
contrast <imageName> <contrast (-100 - 100)>
- Modifies the given images contrast by the given value
opacity <imageName> <alpha (0 - 100)>
- Modifies the given images opacity by the given value
pixelate <imageName> <pixelSize (2+)>
- Pixelates the given image with the given pixel size
greyscale <imageName>
- Converts the given image to greyscale
invert <imageName>
- Inverts the given image
tti <imageName> <size> <wrap width> <color> <text...>
- Converts the given text to an image
ttil <imageName> <size> <wrap width> <color> <text...>
- Converts the given text to an image (aligned left)
ttir <imageName> <size> <wrap width> <color> <text...>
- Converts the given text to an image (aligned right)
skew <imageName> <angle> [vertical = false]
- Skews the given image by the given angle [in the given direction]
get <imageName> <key (width, height)> <variableName>
- Gets the width or the height of the given image and saves it into the given variable name (Note that variable names do not support numbers)
copy <imageName> <cloneName>
- Clones the given image and saves it as the given clone name
render <imageName>
- Renders and returns the given image and ends the script
Comments: You can add a comment by appending ## Comment Here
to a line
Example Script: (.t istest)
{iscript:
load {if:{avatar:{arg:0}}|=||then:{arg:0}|else:{avatar:{arg:0}}} image ## Load the image from the arguments (default to user's avatar)
load http://www.pngall.com/wp-content/uploads/2016/05/Christmas-Hat.png overlay ## Load a christmas hat overlay
magik image 2 ## Apply magik to the image twice
get image width w ## Save the images width as w
get image height h ## Save the images height as h
resize overlay (w/2) (h/2) ## Calculate the overlay's new size
overlay image overlay (w/2) 0 ## Add the overlay to the image
render image ## Render the image
}
Here's a list of commands/aliases for the
![Screen_Shot_2023-06-25_at_6 28 43_PM-1](https://private-user-images.githubusercontent.com/25269274/293085553-b92054d9-1aff-408d-bb3c-31027d81b079.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NTgxNDMsIm5iZiI6MTcyMjQ1Nzg0MywicGF0aCI6Ii8yNTI2OTI3NC8yOTMwODU1NTMtYjkyMDU0ZDktMWFmZi00MDhkLWJiM2MtMzEwMjdkODFiMDc5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzMxVDIwMzA0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYyZjk4ZTY4ZWJkNGJjZjg2OWViYzEwM2UzZDZkMDY5YWJkMjJlOWZlYWUwZTVlMDRhMmJjNjkyZDU5YWRlMzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.b24mnzDPtiTbbB8tbarA_E0hhjSfXFE7i7Z5imfALBk)
{iscript}
tags: