Just starting to dig into Imagero. I pulled down a demo app from the
following site and the compiler barfs at the getAsBufferedImage with
the following message.
getAsBufferedImage(com.imagero.reader.ImageProcOptions) in
com.imagero.reader.Imagero cannot be applied to
(com.imagero.reader.ImageReader,int,boolean)
img
public void paint(Graphics g) {
Dimension d = getPreferredSize();
int width = d.width;
int height = d.height;
Graphics g2 = g.create(0, 0, width, height);
//fill background
int w = 10;
int h = 10;
int r = 0;
int c = 0;
for (int j = 0; j < height; j += h) {
c = 0;
r++;
for (int i = 0; i < width; i += w) {
c++;
if (((r & 1) ^ (c & 1)) == 0) {
g2.setColor(Color.white);
}
else {
g2.setColor(Color.lightGray);
}
g2.fillRect(i, j, w, h);
}
}
//draw image
if (img != null) {
g2.drawImage(img, 0, 0, this);
}
g2.dispose();
}
public Dimension getPreferredSize() {
if (img != null) {
return new Dimension(img.getWidth(null), img.getHeight
(null));
}
return super.getPreferredSize();
}
public static void main(String[] args) throws IOException,
InvocationTargetException, NoSuchMethodException,
ClassNotFoundException {
File file = new File(args[0]);
SimpleImagePanel t = new SimpleImagePanel(file);
ScrollPane sp = new ScrollPane();
sp.add(t);
JFrame frame = new JFrame(t.name);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(sp);
frame.pack();
frame.setVisible(true);
}
}
--
Kevin Muldoon, Owner
TrueBlueDot - Fine Art Printing
New Haven, CT 06511
email@hidden
www.truebluedot.com
"Our pigment meets your imagination"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden