Skip to content

Commit

Permalink
Rename the project (image.sk) to imagesk
Browse files Browse the repository at this point in the history
All GitHub links will redirect to the new URL
  • Loading branch information
Blueyescat committed Dec 27, 2018
1 parent ae9ce71 commit e6a88f8
Show file tree
Hide file tree
Showing 34 changed files with 56 additions and 37 deletions.
14 changes: 7 additions & 7 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# image.sk
# imagesk
A script folder that registers custom syntaxes for image processing in Skript.

Requires *latest* [skript-mirror](https://github.com/btk5h/skript-mirror) and [Skript](https://github.com/bensku/Skript) v2.2+.

Please always use the latest version of skript-mirror and image.sk. If you see any error, try to update them. If that doesn't solve the error then contact with me.
Please always use the latest version of skript-mirror and imagesk. If you see any error, try to update them. If that doesn't solve the error then contact with me.

## Installing
1. Go to [the releases page](https://github.com/Blueyescat/image.sk/releases/tag/v0.5.0)
1. If you want [Vixio](https://github.com/iBlitzkriegi/Vixio) support, download the `image.sk-Vixio-Support.zip` file. Otherwise, download the `image.sk.zip` file
1. Unzip/open the zip, copy the `image.sk` **folder** inside and paste it into your `Skript/scripts/` folder
1. Go to [the releases page](https://github.com/Blueyescat/imagesk/releases/tag/v0.5.0)
1. If you want [Vixio](https://github.com/iBlitzkriegi/Vixio) support, download the `imagesk-Vixio-Support.zip` file. Otherwise, download the `image.sk.zip` file
1. Unzip/open the zip, copy the `imagesk` **folder** inside and paste it into your `Skript/scripts/` folder

**Vixio Support:** Adds some special codes such as uploading an image to Discord depending on the [Vixio](https://github.com/iBlitzkriegi/Vixio) addon.

### Relevant Links
- [Documentation](https://github.com/Blueyescat/image.sk/wiki/Documentation)
- [Examples](https://github.com/Blueyescat/image.sk/wiki/Examples)
- [Documentation](https://github.com/Blueyescat/imagesk/wiki/Documentation)
- [Examples](https://github.com/Blueyescat/imagesk/wiki/Examples)

#### Discord
- Blueyescat#0733
Expand Down
13 changes: 0 additions & 13 deletions image.sk/!utils.sk

This file was deleted.

10 changes: 5 additions & 5 deletions image.sk/!image.sk → imagesk/!main.sk
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ##############################
# Main file of image.sk
# Main file of imagesk (v0.5.0)
#
# https://github.com/Blueyescat/image.sk
# https://github.com/Blueyescat/imagesk
#
# Please don't change this file, write your script in another sk file.
# ##############################

options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down Expand Up @@ -42,11 +42,11 @@ effect imagesk [(1¦parse)] error %string%:
if parse mark is 1:
Skript.error(expression-1)
else:
{{@variable}::Logger}.severe("[image.sk] %expression-1%")
{{@variable}::Logger}.severe("[imagesk] %expression-1%")

effect imagesk warning %string%:
trigger:
{{@variable}::Logger}.warning("[image.sk] %expression-1%")
{{@variable}::Logger}.warning("[imagesk] %expression-1%")

effect imagesk set variable %object% to %object% in %event%:
trigger:
Expand Down
32 changes: 32 additions & 0 deletions imagesk/!utils.sk
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import:
java.awt.Color
java.awt.image.BufferedImage
java.io.File as JavaFile
java.net.URLClassLoader
java.nio.file.Files
java.nio.file.Path
java.nio.file.Paths

com.btk5h.skriptmirror.LibraryLoader

function imagesk_pixelColor(image: object, x: number, y: number) :: object:
set {_rgb} to {_image}.getRGB({_x} and {_y})
return new Color((bits 16-23 of {_rgb}), (bits 8-15 of {_rgb}) and (bits 0-7 of {_rgb}))

function imagesk_setPixelColor(image: object, x: number, y: number, rgb: number):
{_image}.setRGB({_x}, {_y} and {_rgb})

function imagesk_copiedImage(image: object) :: object:
return new BufferedImage(({_image}.getColorModel()), ({_image}.copyData(null)), ({_image}.isAlphaPremultiplied()) and null)

function imagesk_loadClass(path: text, name: text) :: javaobject:
replace all "/" and "\" with JavaFile.separator! in {_path}
set {_path} to Paths.get({_path})
if Files.isDirectory({_path}):
set {_cl} to new URLClassLoader([{_path}.toFile().toURI().toURL()])
set {_class} to {_cl}.loadClass({_name})
broadcast "%{_class}%"
broadcast "%{_class}.getClass()%"
broadcast "%method names of {_class}%"
broadcast "%constructors of {_class}%"
return {_class}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down Expand Up @@ -57,4 +57,4 @@ effect get [the] (image|img) (of|from) (0¦url %-string%|1¦file %-string%|2¦ba
imagesk set variable (raw expression-4) to {_image} in event
else:
set {{@variable}::lastImage} to {_image}
continue
continue
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

expression [(all [[of] the]|the)] (image|img) (text|string)s:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

expression [the] (image|img) (text|string) [((with|from) (id|name)|named)] %string%:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options:
# If changing this is really important for you, you need to change it in all image.sk files.
# If changing this is really important for you, you need to change it in all imagesk files.
variable: imagesk # {imagesk::xxx}

import:
Expand Down

0 comments on commit e6a88f8

Please sign in to comment.