Skip to Content

Text to image generator

Hi,

I need to generate an image from text (initials of an employee) as a fallback when employee has not uploaded his/her photo. (Similarly to what is done in Trello for instance).

Do any of you guys have been down this path?

My approach so far was to call IGS and use the title of an empty chart but it is more a hack than anything else!!

I would prefer a server approach (to fit in our actual front code which relies solely on the employee number)

Thanks in advance.

Best regards,

Guillaume

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 04, 2014 at 12:02 PM

    It would be fun to generate such bmp using only code.

    In Bitmap Processing : Stitching Images Horizontally I am joining two bmp images to create a new one.

    An (m,n) pixel array can be created having default white color. Then based on some calculation specific pixels' color can be changed to black so that it looks like an alphabet.

    OR

    You can upload individual images of all alphabets and use a modified version of my code to join selected images.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 04, 2014 at 12:15 PM

    Once you only need the initials I would go for the second variant of Manish's answer - once all you want to use is straight ABAP.

    Is your picture "really a picture" - or is it a pdf sometimes or something else? In some situations we implemented a ABAP=>JAVA webservice, which runs on the instance. From there, you can use a variety of classes, that is almost endless. By those we implemented a scenario with watermarking a pdf file, converting .docx => pdf. I believe you would find a JAVA class that can do exactly the same - write some font in some height to an existing (in your case plain) image.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.