🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1248

Image pixel inspection

#1248
From: James Hughes
Date: Wed, 17 Apr 2002 08:04
20 lines
1538 bytes
Hi there,

I am having trouble figuring out how I can inspect the rgb values of a gif
image using the normal Java APIs.  I am not interested in drawing the image
at all, I just want to know the color of all the pixels in the image.
Here's some pseudo code to illustrate what I mean:

load image from file "image.gif"
for all pixels in image
  if color = green
    output a message
  if color = blue
    output a message
next pixel

I have got as far as loading the Image into a BufferedImage, but I dont know
how to get at the pixels, can anybody help me?

Thanks,
J
Technical Details
Message-ID: <3cbd2d36$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!teaser.fr!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,937c9cd9161d2c82,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-04-17 01:09:20 PST
Reply-To: "James Hughes" <jimbogaz@hotmail.com>
From: "James Hughes" <jimbogaz@hotmail.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: Image pixel inspection
Date: Wed, 17 Apr 2002 09:04:44 +0100
Lines: 22
Organization: Avoca Communications
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 212.161.14.102
Message-ID: <3cbd2d36$1_1@dnews>
X-Trace: dnews 1019030838 212.161.14.102 (17 Apr 2002 01:07:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!teaser.fr!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews