code: public static byte[] bufferedImageToBMPByteArray(BufferedImage image, BufferedImage bufferedImage) {
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          try {
              /* ImageTypeSpecifier type =
               ImageTypeSpecifier.createFromRenderedImage(image);
               Iterator<ImageWriter> iter = ImageIO.getImageWriters(type, "bmp");
               System.err.println(ImageIO.getWriterFormatNames());
               boolean sig=iter.hasNext();*/
              //BufferedImage bufferedImage = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_RGB);
              Graphics2D ngraphics = (Graphics2D) bufferedImage.getGraphics();
              /*ngraphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
               RenderingHints.VALUE_INTERPOLATION_BILINEAR);*/
              //ngraphics.drawImage(image, 0, 0,512,384,0,0,image.getWidth(),image.getHeight(), null);        	
              //ngraphics.drawImage(image.getScaledInstance(200, 300, BufferedImage.SCALE_FAST), 0, 0,null);        	
              ngraphics.drawImage(image, 0, 0, null);
              ImageIO.write(bufferedImage, "bmp", baos);
              baos.flush();
              byte[] imageInByte = baos.toByteArray();
              baos.close();
              return imageInByte;
          } catch (IOException ex) {
              Logger.getLogger(PHATImageUtils.class.getName()).log(Level.SEVERE, "bufferedImageToByteArray", ex);
          }
          return null;
      }
docs: TODO Optimizar la conversion!!