private static BufferedImage readOrWriteNextImage(PixImage image)
			throws IOException, ClassNotFoundException {
		if (WRITE_MODE) {
			os.writeInt(image.getWidth());
			os.writeInt(image.getHeight());
			os.writeObject(stringOfPixImage(image));
			return ImageUtils.pixImage2buffer(image);
		} else {
			return imageOfString(is.readInt(), is.readInt(),
					(String) is.readObject());
		}
	}