so I need to change or extend the toolkit thumbs driver functions to support the commands in the following order
scaling up by percentage
rotating the image (optional)
starting at point x/y generate new image with width (w) and height(h)
the values in the data can considered not to be out of bounds. the jquery plugin only generates possible values.
how to I extend the thumbs drivers without loosing update support?
can anyone help me with coding imagemagic commands needed? Resizing or Scaling -- IM v6 Examples
so how do I add this functionality to toolkit thumbs drivers without breaking the ability to update kirby? can I extend the thumbs class and override the function?
thx @lukasbestle but I am still stuck. I verified imagemagick is installed. I added a site/plugin/myplugin with your code example. but it seems it is not loaded. i would have expected to get no image if driver code is empty. but i do get the original image.
i tried some dummy code but still no luck. what am I missing?
within the panel I added a custom field which includes the jquery cropping script. the output of the jquery is saved to the value of that field. then I can hit save in panel. but as far as i can tell the thumb is not regenerated - since the image did not really change, just my cropping data which will be forwarded to thumbs driver.
can i trigger recreation of the thumb based on my changed value?
Please see the settingsIdentifier method of the Thumb class. The values mentioned there are incorporated into the hash that is then used to identify the image. If any of these values change, the thumb is regenerated, otherwise the cached copy is used.
You can however manually set the filename param on the Thumb object to include more custom values. The default is '{safeName}-{hash}.{extension}' and you can change it to be '{safeName}-{hash}-x123y234w123h234.{extension}' for example.