Reads a frame at a given position in the file, returns pixels array
(RandomAccessFile rFile, long filePos, int size)
| 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 |
no test coverage detected