#Sampling BufferedImage

3 messages · Page 1 of 1 (latest)

azure fog
#

So I have a bufferd image that I:

  • Convert into an int array via image.getRGB()
  • Convert into a ByteBuffer (1 byte per pixel) with a for loop running through that int array. (I only use 1 color channel)
    Now I need to sample the ByteBuffer, but I do not know which order image.getRGB() returned the pixels in.
    I tried doing this:
data.get((x*width)+z);

but the results show that the data is not stored in that format

deep lotusBOT
#

This post has been reserved for your question.

Hey @azure fog! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.