How do I flip an image horizontally flip with glReadPixels() Bufferedimage and out put with ImageIO?
问题 How do I flip an Screenshot image? I can't find my problem anywhere else. Example code: /* *@param fileLoc //Location of fileoutput destination *@param format //"png" *@param WIDTH //Display.width(); *@param HEIGHT //Display.height(); */ private void getScreenImage(){ int[] pixels = new int[WIDTH * HEIGHT]; int bindex; // allocate space for RBG pixels ByteBuffer fb = ByteBuffer.allocateDirect(WIDTH * HEIGHT * 3);//.order(ByteOrder.nativeOrder()); // grab a copy of the current frame contents