private void writeInt(final OutputStream os, final int value) throws IOException {
        os.write(0xff & value >> 24);
        os.write(0xff & value >> 16);
        os.write(0xff & value >> 8);
        os.write(0xff & value >> 0);
    }
Writes an image to an output stream.

@param src            The image to write.
@param os             The output stream to write to.
@param params         The parameters to use (can be {@code NULL} to use the default {@link PngImagingParameters}).
@param paletteFactory The palette factory to use (can be {@code NULL} to use the default {@link PaletteFactory}).
@throws ImagingException When errors are detected.
@throws IOException      When IO problems occur.
src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java