Login  Register

Re: Overlay image title onto image

Posted by knels on May 31, 2017; 6:08pm
URL: http://imagej.273.s1.nabble.com/Overlay-image-title-onto-image-tp5018802p5018812.html

Actually I figured something out. I also added a black bar at the top to place the title name so the title does not need to obstruct view of any part of the image (picture of how it looks below). I think if anyone needs something like this in the future this is what I used:


//////////////////////

name=getTitle;


setBackgroundColor(0, 0, 0);
w=getWidth();
h=getHeight()+35;
run("Canvas Size...", "width=w height=h position=Bottom-Center");
setFont("Sanserif", 24);
  makeText(name, 2, 2);
setForegroundColor(255, 255, 255);
run("Draw", "slice");