A module for capturing and manipulating image objects from other modules for use with hs.drawing.
| Signature | hs.image.additionalImageNames[] |
|---|---|
| Type | Constant |
| Description | Table of arrays containing the names of additional internal system images which may also be available for use with |
| Notes |
|
| Source | extensions/image/libimage.m line 283 |
| Signature | hs.image.systemImageNames[] |
|---|---|
| Type | Constant |
| Description | Table containing the names of internal system images for use with hs.drawing.image |
| Notes |
|
| Source | extensions/image/libimage.m line 131 |
| Signature | hs.image.getExifFromPath(path) -> table | nil |
|---|---|
| Type | Function |
| Description | Gets the EXIF metadata information from an image file. |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 759 |
| Signature | hs.image.iconForFile(file) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 1097 |
| Signature | hs.image.iconForFileType(fileType) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 1132 |
| Signature | hs.image.imageFromAppBundle(bundleID) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 1068 |
| Signature | hs.image.imageFromASCII(ascii[, context]) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an image from an ASCII representation with the specified context. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 838 |
| Signature | hs.image.imageFromMediaFile(file) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1154 |
| Signature | hs.image.imageFromName(string) -> object |
|---|---|
| Type | Constructor |
| Description | Returns the hs.image object for the specified name, if it exists. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 986 |
| Signature | hs.image.imageFromPath(path) -> object |
|---|---|
| Type | Constructor |
| Description | Loads an image file |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 811 |
| Signature | hs.image.imageFromURL(url[, callbackFn]) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1016 |
| Signature | hs.image:bitmapRepresentation([size], [gray]) -> imageObject |
|---|---|
| Type | Method |
| Description | Creates a new bitmap representation of the image and returns it as a new hs.image object |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1662 |
| Signature | hs.image:colorAt(point) -> table |
|---|---|
| Type | Method |
| Description | Reads the color of the pixel at the specified location. |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 1315 |
| Signature | hs.image:copy() -> imageObject |
|---|---|
| Type | Method |
| Description | Returns a copy of the image |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 1613 |
| Signature | hs.image:croppedCopy(rectangle) -> object |
|---|---|
| Type | Method |
| Description | Returns a copy of the portion of the image specified by the rectangle specified. |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 1347 |
| Signature | hs.image:encodeAsURLString([scale], [type]) -> string |
|---|---|
| Type | Method |
| Description | Returns a bitmap representation of the image as a base64 encoded URL string |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1397 |
| Signature | hs.image:name([name]) -> imageObject | string |
|---|---|
| Type | Method |
| Description | Get or set the name of the image represented by the hs.image object. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1252 |
| Signature | hs.image:saveToFile(filename, [scale], [filetype]) -> boolean |
|---|---|
| Type | Method |
| Description | Save the hs.image object as an image of type |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1487 |
| Signature | hs.image:setName(Name) -> boolean |
|---|---|
| Type | Method |
| Description | Assigns the name assigned to the hs.image object. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/image.lua line 39 |
| Signature | hs.image:setSize(size [, absolute]) -> object |
|---|---|
| Type | Method |
| Description | Returns a copy of the image resized to the height and width specified in the size table. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/image.lua line 53 |
| Signature | hs.image:size([size, [absolute]] ) -> imageObject | size |
|---|---|
| Type | Method |
| Description | Get or set the size of the image represented by the hs.image object. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1280 |
| Signature | hs.image:template([state]) -> imageObject | boolean |
|---|---|
| Type | Method |
| Description | Get or set whether the image is considered a template image. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/libimage.m line 1587 |
| Signature | hs.image:toASCII([width, height]) -> string |
|---|---|
| Type | Method |
| Description | Converts an image to an ASCII representation of the image in the form of a string. |
| Parameters |
|
| Returns |
|
| Source | extensions/image/libimage.m line 1630 |