1 Reply Latest reply on Jan 24, 2008 8:01 AM by buabco

    Draw text on an image

      I need to draw dynamic text, gotten from user input, onto an image (for example png, jpg, gif, or bmp) and then save the result as a new image that the user can select, copy, paste, click on, etc.. I know that I could do this by sending the user inputted text to the server side where a program in C#, or Java, or PHP with the GD library would do the work and then send the new image back to the client. But ... can I do this on the client side with AS3? If so, how?

      Thanks in advance for any help.
        • 1. Re: Draw text on an image
          buabco Level 1
          Actually it can be done, but has mayor problems right now, the most important is that the JPGEncoder is only available for the ADOBE AIR witch means you probably wont be able to regenerate a JPG with the modified image.

          Another restriction is that you can only modify and image at bitmap level with locally loaded images, this is from the same server as the flash application come from.

          I recomend you to read the documentation on the BITMAP object for more information on this, you might still be able to send the BITMAP DATA back to the server and JPG Encode it there, but I'm not sure of the format thata flash encode the bitmap data.