File Image.lua
Functions
Image.mapCoordinates (orientation, top, left, bottom, right, angle, wholeDim) | Static function to map (presumably modified) image coordinates from "what you see" format to internal (xmp-compatible) format, taking orientation into consideration. |
Image.normalizeCoordinates (orientation, top, left, bottom, right, angle, wholeDim) | Static function to normalize image coordinates from internal (xmp-compatible) format to "what you see" format, taking orientation into consideration. |
Image:commit (ets) | Commit all mogrification and exiftool'n transformations. |
Image:getFile () | Get image file path. |
Image:new (t) | Constructor for new instance. |
Image:newClass (t) | Constructor for extending class. |
Image:transferMetadata (fromPhoto, fromPath, profile, toPath, fmtMeta, ets) | Transfer metadata from source photo to target photo, using exiftool. |
Functions
- Image.mapCoordinates (orientation, top, left, bottom, right, angle, wholeDim)
-
Static function to map (presumably modified) image coordinates from "what you see" format to internal (xmp-compatible) format, taking orientation into consideration.
Parameters:
-
orientation
: As per exiftool'd xmp, *not* (catalog) db, not dev settings. -
top
: in fractional format (as opposed to pixels) -
left
: in fractional format (as opposed to pixels) -
bottom
: in fractional format (as opposed to pixels) -
right
: in fractional format (as opposed to pixels) -
angle
: -
wholeDim
:
Usage:
Assures coordinates are properly bounded within image, msg returned indicates type of correction needed, if any.
Orientation takes flip into account.
-
- Image.normalizeCoordinates (orientation, top, left, bottom, right, angle, wholeDim)
-
Static function to normalize image coordinates from internal (xmp-compatible) format to "what you see" format, taking orientation into consideration.
Parameters:
-
orientation
: As per exiftool'd xmp, *not* (catalog) db, not dev settings. -
top
: in fractional format (as opposed to pixels) -
left
: in fractional format (as opposed to pixels) -
bottom
: in fractional format (as opposed to pixels) -
right
: in fractional format (as opposed to pixels) -
angle
: -
wholeDim
:
Usage:
Assures coordinates are properly bounded within image, msg returned indicates type of correction needed, if any.
Orientation takes flip into account.
-
- Image:commit (ets)
-
Commit all mogrification and exiftool'n transformations.
Parameters:
-
ets
:
-
- Image:getFile ()
- Get image file path.
- Image:new (t)
-
Constructor for new instance.
Parameters:
-
t
:
Usage:
An unconventional contstructor which returns nil if can't be constructed, instead of throwing an error.
Return values:
- new image instance, or nil.
- error message if no new instance.
-
- Image:newClass (t)
-
Constructor for extending class.
Parameters:
-
t
:
-
- Image:transferMetadata (fromPhoto, fromPath, profile, toPath, fmtMeta, ets)
-
Transfer metadata from source photo to target photo, using exiftool.
Parameters:
-
fromPhoto
: -
fromPath
: -
profile
: -
toPath
: -
fmtMeta
: -
ets
:
Usage:
Metadata to transfer is specified in local prefs.
-