Message Boards Message Boards

0
|
8759 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Erase the white background

Posted 9 years ago

Hello to all, I would like to ask for your help to find a solution to the following problem I have. The problem is that at the time of using the command ImageCompose the sign that stands on the top of the image has a white background and that is what I would like to delete, that only appear green letters on the image, and try to use Background-> None, but I failed to erase the white background, I hope that someone can guide me to solve my problem , thanks in advance.

Here is a picture of the problem that I have. my code

POSTED BY: Luis Ledesma
3 Replies
Posted 9 years ago

Thank you very much for your help @Marco Thiel and @Mikael Forsgren, that's exactly where needed, greetings Luis

POSTED BY: Luis Ledesma

Alternatively, you can remove the background:

img = ExampleData[{"TestImage", "Lena"}];
ImageCompose[img, RemoveBackground[Rasterize[Style["UNSOLVED", "Title", Green, Bold, 80]], White]]

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel

Hi Luis if youuse Graphics[] instead of rasterizing the text you should get you result you were aiming for:

im = ExampleData[{"TestImage", "Lena"}];
ImageCompose[im, 
 Graphics[Text[Style["SOLVED", "Title", Green, Bold, 70]]]]

enter image description here

Hope this helps! /Mikael

POSTED BY: Mikael Forsgren
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract