Skip to content

Commit 4f42db3

Browse files
committed
2025.05.18 (1.54q14; AVI Reader)
1 parent 2651c5f commit 4f42db3

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

ij/ImageJ.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener,
7979

8080
/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
8181
public static final String VERSION = "1.54q";
82-
public static final String BUILD = "13";
82+
public static final String BUILD = "14";
8383
public static Color backgroundColor = new Color(237,237,237);
8484
/** SansSerif, 12-point, plain font. */
8585
public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12);

ij/plugin/AVI_Reader.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,12 +1207,12 @@ private Object readFixedLengthFrame (RandomAccessFile rFile, int size) throws Ex
12071207
byte[] bPixels = null;
12081208
int[] cPixels = null;
12091209
short[] sPixels = null;
1210-
if (biBitCount <=8 || convertToGray) {
1211-
bPixels = new byte[dwWidth * biHeight];
1212-
pixels = bPixels;
1213-
} else if (biBitCount == 16 && dataCompression == NO_COMPRESSION) {
1210+
if (biBitCount == 16 && dataCompression == NO_COMPRESSION) {
12141211
sPixels = new short[dwWidth * biHeight];
12151212
pixels = sPixels;
1213+
} else if (biBitCount <=8 || convertToGray) {
1214+
bPixels = new byte[dwWidth * biHeight];
1215+
pixels = bPixels;
12161216
} else {
12171217
cPixels = new int[dwWidth * biHeight];
12181218
pixels = cPixels;
@@ -1223,12 +1223,12 @@ private Object readFixedLengthFrame (RandomAccessFile rFile, int size) throws Ex
12231223
int offset = topDown ? 0 : (biHeight-1)*dwWidth;
12241224
int rawOffset = 0;
12251225
for (int i = biHeight - 1; i >= 0; i--) { //for all lines
1226-
if (biBitCount <=8 || isPlanarFormat)
1226+
if (biBitCount==16 && dataCompression == NO_COMPRESSION)
1227+
unpackShort(rawData, rawOffset, sPixels, offset, dwWidth);
1228+
else if (biBitCount <=8 || isPlanarFormat) //planar&converToGray: read 1st plane (Y)
12271229
unpack8bit(rawData, rawOffset, bPixels, offset, dwWidth);
12281230
else if (convertToGray)
12291231
unpackGray(rawData, rawOffset, bPixels, offset, dwWidth);
1230-
else if (biBitCount==16 && dataCompression == NO_COMPRESSION)
1231-
unpackShort(rawData, rawOffset, sPixels, offset, dwWidth);
12321232
else
12331233
unpack(rawData, rawOffset, cPixels, offset, dwWidth);
12341234
rawOffset += isPlanarFormat ? dwWidth : scanLineSize;

release-notes.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<body>
77

88

9-
<li> <u>1.54q13 12 April 2025</u>
9+
<li> <u>1.54q14 12 April 2025</u>
1010
<ul>
1111
<li> Thanks to 'aschain', the 3D filters in the <i>Process&gt;Filters</i>
1212
menu now work with hyperstacks.
@@ -30,6 +30,8 @@
3030
command did not correctly set the dimensions.
3131
<li> Thanks to Christian Tischer, fixed bug where the ChanneSplitter.split()
3232
method failed in Fiji headless mode.
33+
<li> Thanks to Michael Schmid, fixed bug with opening a 16-bit AVI with
34+
"Convert to grayscale" causing an ArrayIndexOutOfBoundsException.
3335
<li> Thanks to Michael Schmid, fixed 1.54m9 <i>Analyze&gt;Plot Profile</i>
3436
regression where ImageProcessor.getLine() did not sample the
3537
correct points.

0 commit comments

Comments
 (0)