From: ssecorp on
I odnt get the exact complaint here. and why am i filling in "w" in
the end again?
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/PixelGrabber.html


import java.awt.image.PixelGrabber;

public class Main {

public static void main(String[] args) {
int w = 50;
int h = 50;
int[] pixels = new int[w * h];
PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
images/giffer.gif", 1, 1, w, h, pixels, 0, w);
}

}


init:
deps-jar:
Compiling 1 source file to C:\Users\saftarn\Documents\NetBeansProjects
\JAItest\build\classes
C:\Users\saftarn\Documents\NetBeansProjects\JAItest\src\jaitest
\Main.java:11: cannot find symbol
symbol : constructor
PixelGrabber(java.lang.String,int,int,int,int,int[],int,int)
location: class java.awt.image.PixelGrabber
PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
images/giffer.gif", 1, 1, w, h, pixels, 0, w);
1 error
BUILD FAILED (total time: 0 seconds)
From: Eric Sosman on
ssecorp wrote:
> I odnt get the exact complaint here. and why am i filling in "w" in
> the end again?
> http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/PixelGrabber.html
>
>
> import java.awt.image.PixelGrabber;
>
> public class Main {
>
> public static void main(String[] args) {
> int w = 50;
> int h = 50;
> int[] pixels = new int[w * h];
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> }
>
> }
>
>
> init:
> deps-jar:
> Compiling 1 source file to C:\Users\saftarn\Documents\NetBeansProjects
> \JAItest\build\classes
> C:\Users\saftarn\Documents\NetBeansProjects\JAItest\src\jaitest
> \Main.java:11: cannot find symbol
> symbol : constructor
> PixelGrabber(java.lang.String,int,int,int,int,int[],int,int)
> location: class java.awt.image.PixelGrabber
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> 1 error
> BUILD FAILED (total time: 0 seconds)

There is no PixelGrabber constructor that takes a String as
its first argument. Depending on which constructor you intend to
use, you need to provide an Image or an ImageProducer.

If you'll forgive me for saying so, I think you're trying to
program by magic: Trying out semi-random incantations until you
stumble on one that gives the desired result. That will work, in
the very long run, but it's not a speedy or efficient process and
it's likely to produce programs that work for the test cases but
fail when you apply them to real data. I'd suggest that you spend
some time with a textbook or other such materials; Sun's on-line
tutorial has a section on 2D graphics that may be helpful to you.

--
Eric.Sosman(a)sun.com
From: Knute Johnson on
ssecorp wrote:
> I odnt get the exact complaint here. and why am i filling in "w" in
> the end again?
> http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/PixelGrabber.html
>
>
> import java.awt.image.PixelGrabber;
>
> public class Main {
>
> public static void main(String[] args) {
> int w = 50;
> int h = 50;
> int[] pixels = new int[w * h];
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> }
>
> }
>
>
> init:
> deps-jar:
> Compiling 1 source file to C:\Users\saftarn\Documents\NetBeansProjects
> \JAItest\build\classes
> C:\Users\saftarn\Documents\NetBeansProjects\JAItest\src\jaitest
> \Main.java:11: cannot find symbol
> symbol : constructor
> PixelGrabber(java.lang.String,int,int,int,int,int[],int,int)
> location: class java.awt.image.PixelGrabber
> PixelGrabber pix = new PixelGrabber("C:/users/saftarn/desktop/
> images/giffer.gif", 1, 1, w, h, pixels, 0, w);
> 1 error
> BUILD FAILED (total time: 0 seconds)

Lose the PixelGrabber it is only going to give you grief. Use the
ImageIO class to read in your images and access the pixel data from the
BufferedImage.

--

Knute Johnson
email s/nospam/knute2008/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
From: Andrew Thompson on
On Jul 8, 6:32 am, Daniele Futtorovic <da.futt.n...(a)laposte.invalid>
wrote:

> >http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/PixelGrabber.html
>
> Unless you are really working with 1.4.2, use up-to-date documentation:
> <http://java.sun.com/javase/6/docs/api/>

I sometimes have trouble producing direct links
to the SE 6 JavaDocs when searching 'ClassName+javadoc'
in a major search engine. It tends to throw up
hits for 1.4.2.

Perhaps that is where this '1.4' link originated from.

--
Andrew Thompson
http://pscode.org/
From: Lew on
Andrew Thompson wrote:
> On Jul 8, 6:32 am, Daniele Futtorovic <da.futt.n...(a)laposte.invalid>
> wrote:
>
>>> http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/PixelGrabber.html
>> Unless you are really working with 1.4.2, use up-to-date documentation:
>> <http://java.sun.com/javase/6/docs/api/>
>
> I sometimes have trouble producing direct links
> to the SE 6 JavaDocs when searching 'ClassName+javadoc'
> in a major search engine. It tends to throw up
> hits for 1.4.2.
>
> Perhaps that is where this '1.4' link originated from.

Well, that and a complete failure to read what one is writing and think about
whether the first search hit is the correct search hit.

--
Lew