hs.image.additionalImageNames[]
hs.drawing.image
and hs.image.imageFromName.hs.image.systemImageNames[]
hs.image.systemImageNames
.hs.image.getExifFromPath(path) -> table | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Gets the EXIF metadata information from an image file. | | Parameters |nil
if no metadata can be found or the file path is invalid.hs.image.iconForFile(file) -> object
hs.image
object for the file or files specifiedhs.image
object or nil, if there was an error. The image will be the icon for the specified file or an icon representing multiple files if an array of multiple files is specified.hs.image.iconForFileType(fileType) -> object
hs.image
object of the icon for the specified file type.hs.image
object or nil, if there was an errorhs.image.imageFromAppBundle(bundleID) -> object
hs.image
object using the icon from an Apphs.image
object or nil, if no app icon was foundhs.image.imageFromASCII(ascii[, context]) -> object
hs.image
object, or nil if an error occuredhs.image.imageFromMediaFile(file) -> object
hs.image
object from a video file or the album artwork of an audio file or directoryhs.image
objecths.image
object, otherwise the filetype iconhs.image
objecths.image
object, otherwise the filetype iconhs.image.imageFromName(string) -> object
hs.image.systemImageNames
.setName
method since the last full restart of Hammerspoonhs.image.systemImageNames
are located)hs.image:setName
method on an hs.image object.hs.image.imageFromPath(path) -> object
hs.image
object, or nil if an error occuredhs.image.imageFromURL(url[, callbackFn]) -> object
hs.image
object from the contents of the specified URL.hs.image
object or nil, if the url does not specify image contents or is unreachable, or if a callback function is suppliedhs.image:colorAt(point) -> table
point
- a hs.geometry.point
hs.drawing.color
objecths.image:copy() -> imageObject
hs.image:croppedCopy(rectangle) -> object
hs.image:encodeAsURLString([scale], [type]) -> string
hs.image.imageFromURL(string)
hs.image:getLoupedeckArray() -> table
hs.image
object into an RGB array string suitable for the Loupedeck CT device.hs.image:name([name]) -> imageObject | string
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set the name of the image represented by the hs.image object. | | Parameters |name
- an optional string specifying the new name for the hs.image object.hs.image:saveToFile(filename, [scale], [filetype]) -> boolean
filetype
to the specified filename.scale
is true) as reported by hs.image:size() for the image objecths.image:setName(Name) -> boolean
hs.image:name(name) and true or false
.hs.image:setSize(size [, absolute]) -> object
hs.image:copy():size(size, [absolute])
.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 |size
- an optional table with 'h' and 'w' keys specifying the size for the image.absolute
- when specifying a new size, an optional boolean, default false, specifying whether or not the image should be resized to the height and width specified (true), or whether the copied image should be scaled proportionally to fit within the height and width specified (false).hs.image:template([state]) -> imageObject | boolean
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set whether the image is considered a template image. | | Parameters |state
- an optional boolean specifying whether or not the image should be a template.