New feature! Upgrade and increase expert visibility of your issues with Priority Questions.
Image img; int width = img.getWidth(); int height = img.getHeight(); // Pixels are stored in aarrggbb format in a single integer. int argb = new int[width * height]; img.getPixels(argb); // Now this other image class wants the pixel buffer as a byte array. byte argb2 = new byte[width * height * 4]; ImgOther img2 = new ImgOther(argb2); // But is there any way to do something like: byte argb2 = (byte)argb; ImgOther img3 = new ImgOther(argb3);
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.