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 `hs.drawing.image` and [hs.image.imageFromName](#imageFromName). |
| Notes | |
| Source | extensions/image/internal.m |
| 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/internal.m |
| Signature | hs.image.getExifFromPath(path) -> table | nil |
|---|---|
| Type | Function |
| Description | Gets the EXIF metadata information from an image file. |
| Parameters |
|
| Returns |
|
| Source | extensions/image/internal.m |
| Signature | hs.image.iconForFile(file) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an `hs.image` object for the file or files specified |
| Parameters |
|
| Returns |
|
| Source | extensions/image/internal.m |
| Signature | hs.image.iconForFileType(fileType) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an `hs.image` object of the icon for the specified file type. |
| Parameters |
|
| Returns |
|
| Source | extensions/image/internal.m |
| Signature | hs.image.imageFromAppBundle(bundleID) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an `hs.image` object using the icon from an App |
| Parameters |
|
| Returns |
|
| Source | extensions/image/internal.m |
| 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/internal.m |
| Signature | hs.image.imageFromMediaFile(file) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an `hs.image` object from a video file or the album artwork of an audio file or directory |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/internal.m |
| 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/internal.m |
| Signature | hs.image.imageFromPath(path) -> object |
|---|---|
| Type | Constructor |
| Description | Loads an image file |
| Parameters |
|
| Returns |
|
| Source | extensions/image/internal.m |
| Signature | hs.image.imageFromURL(url[, callbackFn]) -> object |
|---|---|
| Type | Constructor |
| Description | Creates an `hs.image` object from the contents of the specified URL. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/internal.m |
| Signature | hs.image:colorAt(point) -> table |
|---|---|
| Type | Method |
| Description | Reads the color of the pixel at the specified location. |
| Parameters |
|
| Returns |
|
| Source | extensions/image/internal.m |
| Signature | hs.image:copy() -> imageObject |
|---|---|
| Type | Method |
| Description | Returns a copy of the image |
| Parameters |
|
| Returns |
|
| Source | extensions/image/internal.m |
| 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/internal.m |
| 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/internal.m |
| 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/internal.m |
| Signature | hs.image:saveToFile(filename, [scale], [filetype]) -> boolean |
|---|---|
| Type | Method |
| Description | Save the hs.image object as an image of type `filetype` to the specified filename. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/internal.m |
| Signature | hs.image:setName(Name) -> boolean |
|---|---|
| Type | Method |
| Description | Assigns the name assigned to the hs.image object. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/init.lua |
| 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/init.lua |
| Signature | hs.image:size([size, [absolute]] ) -> imageObject | size |
|---|---|
| Type | Method |
| Description | Get or set the size of the image represented byt he hs.image object. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/image/internal.m |
| 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/internal.m |