Skip to content

Instantly share code, notes, and snippets.

View arnav-gudibande's full-sized avatar

Arnav Gudibande arnav-gudibande

  • Perplexity AI
  • San Francisco Bay Area
View GitHub Profile
@arnav-gudibande
arnav-gudibande / getColorPixel
Created April 23, 2016 17:12
gets the color of a pixel in a buffered image
public static int getColorPixel(double x, double y, BufferedImage image) throws IOException {
int xx = (int) x;
int yy = (int) y;
int clr = image.getRGB(xx,yy);
int blue = clr & 0x000000ff;
return blue;
}