Dynamic PNG-buttons withGD library

In my application I have to support multi languages. For the text-information may change I need to build dynamic buttons and charts. Under windows I compiled the GD-lib and get the nice PNG image I need. My question is: How/where do I get the Browser request i[/i] in Allegro’s RomPager? What sink (destination) must I use for writing down the PNG-stream?