MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / readFrame

Method readFrame

ij/src/main/java/ij/plugin/AVI_Reader.java:1174–1183  ·  view source on GitHub ↗

Reads a frame at a given position in the file, returns pixels array

(RandomAccessFile rFile, long filePos, int size)

Source from the content-addressed store, hash-verified

1172
1173 /** Reads a frame at a given position in the file, returns pixels array */
1174 private Object readFrame (RandomAccessFile rFile, long filePos, int size)
1175 throws Exception, IOException {
1176 rFile.seek(filePos);
1177 //if (verbose)
1178 //IJ.log("virtual AVI: readFrame @"+posSizeString(filePos, size)+" varlength="+variableLength);
1179 if (variableLength) //JPEG or PNG-compressed frames
1180 return readCompressedFrame(rFile, size);
1181 else
1182 return readFixedLengthFrame(rFile, size);
1183 }
1184
1185 /** Reads a JPEG or PNG-compressed frame from a RandomAccessFile and
1186 * returns the pixels array of the resulting image and sets the

Callers 2

getProcessorMethod · 0.95
readMovieDataMethod · 0.95

Calls 3

readCompressedFrameMethod · 0.95
readFixedLengthFrameMethod · 0.95
seekMethod · 0.65

Tested by

no test coverage detected