×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    Unable to find bufferedImage class in J2ME

    Using ZXing within a Java program is quite easy. First, you need an implementation of com.google.zxing.Reader. You might use an implementation that can detect all formats the library reads:

    Reader reader = new MultiFormatReader();

    Or, for example, if you knew you were only reading QR Codes, you might instantiate an implementation that only understands QR Codes. This is more efficient.

    Reader reader = new QRCodeReader();

    Next you need an image to decode. Readers read implementations of com.google.zxing.MonochromeBitmapSource, which are abstractions on top of various classes representing images, presenting them as a monochrome image to be decoded.

    For example, an implementation exists for instances of java.awt.BufferedImage:

    BufferedImage myImage = ...;
    LuminanceSource source = new BufferedImageLuminanceSource(myImage);
    BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));

    I am not getting "BufferedImage" class. I have to use an instance of BufferedImage calss to pass it to "BufferedImageLuminanceSource".

    Also I am unable to include "java.awt.BufferedImage" class since it is available only on "stand alone applications"(swings and applets) and I am using J2ME.


    Can anyone please help me out regarding this.

    Thanks in advance.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Unable to find bufferedImage class in J2ME

    You're using the J2SE client code. You must use the J2ME client code.

    Graham.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    Re: Unable to find bufferedImage class in J2ME

    Quote Originally Posted by grahamhughes View Post
    You're using the J2SE client code. You must use the J2ME client code.

    Graham.




    ya i am using J2ME client code but i am getting BufferedImage class

  4. #4
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Unable to find bufferedImage class in J2ME

    then you might be using 3rd party classes that are providing BufferdImage bcoz j2me as such doesn't provide it
    Regards,
    Saurabh

  5. #5
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Unable to find bufferedImage class in J2ME

    Quote Originally Posted by bindubindu685 View Post
    ya i am using J2ME client code but i am getting BufferedImage class
    In which class is the reference to BufferedImage?

    You should only build the "core" and "j2me" components. You are building either "core/test" or "j2se", and you don't need to build these.

    Follow the instructions here for "Run on your phone".

    Graham.

  6. #6
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    Re: Unable to find bufferedImage class in J2ME

    it refering to java.awt.BufferedImage but this is not available in j2me
    so please let me know how resolve this problem

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Unable to find bufferedImage class in J2ME

    There is no reference to the BufferedImage in the J2ME code.

    You are trying to build the J2SE code.

    Do this (from the "run on your phone" instructions):

    * Download and install Sun's Java Wireless Toolkit 2.5.2

    * At the top level of the project, edit build.properties to reference the location where you installed WTK.

    * Download Proguard, and copy proguard.jar to the bin directory under the WTK 2.5.2 installation directory.

    * Build core and then javame:
    Code:
        cd core 
        ant 
        cd ../javame 
        ant
    * Refer to instructions for your particular phone model to learn how to load this application onto your device
    We cannot help you without more information.

    Does the process for building ZXing (above) work?

    Graham.

Similar Threads

  1. J2ME or C++ for VoIP on Mobile Phone
    By sandeepkumar03 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-11-13, 20:14
  2. Replies: 1
    Last Post: 2003-02-26, 08:04
  3. J2ME Performance Monitor Class
    By atomictag in forum Mobile Java General
    Replies: 0
    Last Post: 2003-02-03, 10:15
  4. Unable to find the com.symbian.epoc package for Nokia 9200 sdk for Java
    By ajayluthria in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2002-07-26, 08:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •