0

When trying to insert a Label onto the image, i can do that an also manipulate the font and color of the label as it is displayed on the screen.

However, the label (in this case the title of the title of the image, fails of display when i save the image.

Macro Snippet

style = 3; // Font.BOLD (1)+Font.ITALIC (2);
call("ij.gui.TextRoi.setFont", "Times", 80, style);
setForegroundColor(80, 255, 160);
run("Label...", "format=Text x=10 y=20 font=20 text=["+name_original+"] use use_text show");
Aly Abdelaziz
  • 292
  • 4
  • 24

1 Answers1

0

When you say "fails of display", you mean that when you reload the image, the label is gone ? For me everything works fine. I opened an image, ran your code, a label appeared in the top left corner of the image, saved the image, closed it, opened it again, and the label was still there.

Soltius
  • 2,162
  • 1
  • 16
  • 28
  • It runs and the label displays at the left corner; hen i save the image as TIFF or PNG. When i open the saved image, the label is no where to be found! – Aly Abdelaziz Dec 09 '16 at 14:56
  • It seems to work, if the overlay is set to off. ' run("Label...", "format=Text x=10 y=20 font=20 text=["+name_original+"] use_text");' – Aly Abdelaziz Dec 09 '16 at 18:27