word/edit: crop coordinates separate from convert parameters
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 5 Jan 2022 00:04:53 +0000 (01:04 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 7 Feb 2022 17:42:33 +0000 (18:42 +0100)
commit492daa38d18c5b1eb173f4a4ccd4ae43968c3b3d
treed1f26fd65793ac0e7b62af5b05357de39c95813f
parentb8356cfbfb64e8103dadc2e96c1c62ee13a3f687
word/edit: crop coordinates separate from convert parameters

Move -area value into a distinct image column crop32:

UPDATE word SET image = jsonb_insert(
image #- '{convert,0}' #- '{convert,0}',
'{crop32}', image->'convert'->1
)
WHERE image->'convert'->>0 = '-area';

UPDATE word SET image = jsonb_insert(
image #- '{convert,2}' #- '{convert,2}',
'{crop32}', image->'convert'->3
)
WHERE image->'convert'->>2 = '-area'
AND image->'convert'->>0 = '-gravity';

Remaining usage may be influenced by preceding options and need manual
inspection.
Shiar_Sheet/ImagePrep.pm
word/edit.plp