user1720616
user1720616

Reputation: 553

BufferedImage to array

What are the advantages of converting a buffered image into an array of integers?I assume that i can manipulate the array and cross process the picture .Is that so?

Upvotes: 0

Views: 530

Answers (3)

Dan D.
Dan D.

Reputation: 32391

Having a BufferedImage into memory as an array of int values could help you apply filters on the image by processing the int values into memory and then setting the result back to another BufferedImage.

Upvotes: 0

Heisenbug
Heisenbug

Reputation: 39164

I think you are referring to getRgb() method of BufferedImage class.

Supposing you want to modify the whole image or a big portion of it, retrieving the pixel array, and perform operations on it could be considerely faster than accessing each single pixel through method calls such as setRgb().

Upvotes: 2

Related Questions