First create an Image from the RGB array (make sure the color components are in the right order in the int, which is ARGB). You can do this with the BufferedImage class.
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
bi.setRGB(yourpixelarray);
Of course your int array must be width * height in size.
Next, use the ImageIO class to write this BufferedImage to a jpeg file. Something like:
ImageIO.write(bi, "jpg", new File("thefile.jpg"));
That should do it.
bi.setRGB(yourpixelarray);doesn't exists.
There is bi.setRGB(0,0,mp4.getWidth(), mp4.getHeight(),dataRGB,0,1);
and then I write it on an output stream but I received a black image.
response.setContentType("image/jpg");
OutputStream out = response.getOutputStream();
ImageIO.write(bi, "jpg", out);
out.close();