Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Javascript - Capture Image From Text?

Options
  • 29-07-2011 9:27pm
    #1
    Registered Users Posts: 8,004 ✭✭✭


    Hi Folks,

    This is probably impossible but can this be done in JavaScript.

    I'm looking to build a form. On that form there will be a text input box. What I want to do with that text is capture it as a image, crop to a certain size and then upload in the usual way through PHP.

    Now the problem is some of the text will be superscript and subscript, and everything in between. Is that possible to capture?

    Thanks in advance!

    EDIT:

    Ok, did some digging in the PHP manual and found this: http://www.php.net/manual/en/book.image.php

    And in particular this: http://www.php.net/manual/en/image.examples-png.php

    However, is there any way to edit that script so that I could output for example and equation? Would require a string to interpet the "sub" tags wouldn't it?

    Also, I assume I can take the imagepng($im) output and upload as per usual in a processing file?


Comments

Advertisement