Skip to main content

mr resources set-dimensions

Force the stored width and height on every Resource listed in --ids. Useful when recalculate-dimensions cannot decode the file format (e.g., proprietary formats) or when the stored dimensions are known to be stale. Does not transform the file bytes; only updates the database record. All three flags (--ids, --width, --height) are required.

Usage

mr resources set-dimensions

Examples

Set dimensions on a single resource

mr resources set-dimensions --ids 7 --width 1920 --height 1080

Batch update from a tag filter

IDS=$(mr resources list --tags 5 --json | jq -r 'map(.id) | join(",")')
mr resources set-dimensions --ids $IDS --width 800 --height 600

Flags

FlagTypeDefaultDescription
--idsstring``Comma-separated resource IDs (required) (required)
--widthuint0Width in pixels (required) (required)
--heightuint0Height in pixels (required) (required)

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Exit Codes

0 on success; 1 on any error

See Also