I am in the process of writing Joomla functionality that will produce JPEG-images on the fly using Imagick and GD. It is supposed to be used in Joomla articles like this:
<IMG src="/index.php?option_com=mycomponent&id=524&width=800...." alt=" .... " />
I have managed to get the code to work in PHP with direct access to the database and the file system, but I want to integrate it into Joomla as an extension (not necessarily a component) to take advantage of Joomla's security, access management, logging and more.
However, it seems that Joomla extensions always return their output to Joomla which then merges the output with other elements before sending the whole thing off to the browser.
I want to avoid direct access from outside to temporary files, so instead my extension should generate the dynamic image and send it off to the browser with the correct headers. That means that the extension must circumvent Joomla and send to the browser directly. How would you accomplish that?
NB: Tried Base64 encoding directly into the image tag, but could not make it work.