Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Text to image generator

guillaume-hrc
Active Contributor
0 Likes
2,421

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

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,995

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

In 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.

Read only

0 Likes
1,995

I like your idea!

Unfortunately, there is a bit more work because we support many countries with different alphabets but this is still a good idea. 

Read only

Former Member
0 Likes
1,995

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.

Read only

0 Likes
1,995

Thx Jozef.

We're not doing much Java here but the same idea applies to any other provider (such as PHP server preferably for us)