Skip to content

Commit

Permalink
2024.07.10 (1.54k10; Image>Duplicate)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Jul 2, 2024
1 parent 8799326 commit b9b7f93
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ij/ImageJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener,

/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
public static final String VERSION = "1.54k";
public static final String BUILD = "8";
public static final String BUILD = "10";
public static Color backgroundColor = new Color(237,237,237);
/** SansSerif, 12-point, plain font. */
public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12);
Expand Down
2 changes: 1 addition & 1 deletion ij/macro/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -3194,9 +3194,9 @@ void setFont() {
String styles = getLastString().toLowerCase();
if (styles.contains("bold")) style += Font.BOLD;
if (styles.contains("italic")) style += Font.ITALIC;
if (styles.contains("non-")||styles.contains("no-")) antialiasedText=false;
if (styles.contains("nonscal")) nonScalableText=true;
if (styles.contains("anti")) antialiasedText=true;
if (styles.contains("non-")||styles.contains("no-")) antialiasedText=false;
} else
interp.getRightParen();
}
Expand Down
8 changes: 5 additions & 3 deletions ij/plugin/Duplicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ public void run(String arg) {
Rectangle bounds = imp.getRoi().getBounds();
imp.setRoi(bounds);
}
boolean roiOutside = false;
if (roiA!=null) {
Rectangle r = roiA.getBounds();
if (r.x>=imp.getWidth() || r.y>=imp.getHeight() || r.x+r.width<=0 || r.y+r.height<=0) {
IJ.error("Roi is outside image");
return;
ignoreSelection = true;
roiOutside = true;
}
}
int stackSize = imp.getStackSize();
Expand Down Expand Up @@ -87,7 +88,8 @@ else if (duplicateStack || imp.getStackSize()==1) {
}
if (ignoreSelection && roi!=null) {
imp.setRoi(roi);
imp2.setRoi((Roi)roi.clone());
if (!roiOutside)
imp2.setRoi((Roi)roi.clone());
}
Calibration cal = imp2.getCalibration();
if (roi!=null && (cal.xOrigin!=0.0||cal.yOrigin!=0.0)) {
Expand Down
8 changes: 7 additions & 1 deletion release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
</head>
<body>

<li> <u>1.54k8 28 June 2024</u>
<li> <u>1.54k10 2 July 2024</u>
<ul>
<li> Thanks to Bram van den Broek, the <i>Image&gt;Duplicate</i>
command enables the "Ignore Selection" option when the ROI is
outside the image.
<li> Thanks to Herbie Gluender, the <i>Image&gt;Duplicate</i>
command retains the selection when "Ignore Selection" is
checked in the dialog.
Expand All @@ -22,6 +25,9 @@
<li> Thanks to Philippe Carl and Michael Schmid, fixed bug
where the roiManager("select",index) macro function did
not remove previous selections.
<li> Thanks to Oleg Dobrokhotov, fixed bug with the
"non-antialiased" option of the setFont() macro
function to not work as expected.
<li> Thanks to Felix Rudolphi and Curtis Rueden, fixed a
1.54i regression that caused FileOpener to throw
HeadlessExceptions in headless environments.
Expand Down

0 comments on commit b9b7f93

Please sign in to comment.