Hey - I have several images in png format that I want to convert into jpg.
They are integrated with kirbytext. Can I manipulate the thumb driver in some way?
The thumb driver only comes into effect if you actually create thumbs, but if you integrate images with the image KirbyTag, no thumbs are created, unless you have modified the tag.
You could, however, modify the image kirbytag and add an action that converts the image to jpg and at the same time then renders this newly created image instead of the original one.
But if its just a few images, I’d probably rather replace the images manually and do a search and replace.
Converting file type is not an option available through the thumbs driver. You could either create a custom driver or do the type conversion before you call the thumb method.
But you would have to check which ImageMagick option does this conversion (I found format but looks like you need the mogrify utility for that).
Another option would be to use the SimpleImage class to do that. Here’s a very simple example using SimpleImage:
This code is far from perfect but should give you an idea.