Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Imagero & getAsBufferedImage problem



Kevin Muldoon wrote:

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


Full code here. Help?

Read the docs. Specifically, read the docs for com.imagero.reader.MetadataUtils, the class whose method is causing the barf. Find getAsBufferedImage. Note it's defined in another class. Click it. Note the arg types to the method.


So given that getAsBufferedImage() is shown to only take an ImageProcOptions, not an ImageReader, int, and boolean, imagine what circumstances could explain that.

The explanation I come up with is simple: "The API changed". So the demo you downloaded was written for a different and incompatible revision of the Imagero API. Next question is how to deal with the incompatibility.

The solution is to click the link to ImageProcOptions at getBufferedImage's API, and read that class's API docs. ImageProcOptions turns out to be an object that holds a bunch of related parameters in a single "group".

So the ultimate answer has two parts:
  1. Change the demo code to use ImageProcOptions.
  2. File a bug at imagero.com against the demo code.

Quality and consistency issues like this are not unusual in open source code, so it's a good idea to have a strategy for handling them. When there are forums or feedback channels to the developer, that is often a useful starting place.

  -- GG

_______________________________________________
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

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.