Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Re: How to read a text from an Image file?

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Location
    delhi
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to read a text from an Image file?

    how u can import BASE64Encode() package i am getting error please help me


  2. #2
    Junior Member
    Join Date
    Oct 2013
    Location
    delhi
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default java image processing

    File newFile=new File("C:\\Image\\9R6-CCI\\09082010\\K08E091209FT_8033.tif");
    byte[] fileData = new byte[ (int)newFile.length()];
    InputStream inStream = new FileInputStream( newFile);
    inStream.read(fileData);
    inStream.close();
    String tempFileData = new String(fileData);
    String imageString=new BASE64Encoder().encode(fileData);

    i am working on final year project please tell me which package or which jar i will include in that code .
    in this above code error"BASE64Encoder cannot be resolved to a type" what i can i do for removing that
    error please tell me thanks in advance

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How to read a text from an Image file?

    Please don't hijack a 3 year old post, especially with a seemingly unrelated question. And please don't double post...I have merged your posts

  4. #4
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Re: How to read a text from an Image file?

    For someone who is at "final year" level, your question is pretty depressing. On topic however, the BASE64 classes you're trying to use are long-removed from the Java API. I advise you to use an Apache Commons API instead, see Base64 or if you're really against using libraries, have a look at DataTypeConverter.
    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code

  5. #5
    Junior Member
    Join Date
    Oct 2013
    Location
    delhi
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to read a text from an Image file?

    k

  6. #6
    Junior Member
    Join Date
    Oct 2013
    Location
    delhi
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to read a text from an Image file?

    thanks

Similar Threads

  1. What is the best way to read from a text file?
    By Kerr in forum File I/O & Other I/O Streams
    Replies: 20
    Last Post: January 4th, 2012, 05:41 PM
  2. Re: How to read a text from an Image file?
    By aparnaverma in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: October 5th, 2011, 08:01 AM
  3. How to read a text from an Image file?
    By GautamRy in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: October 5th, 2011, 05:02 AM
  4. Replies: 8
    Last Post: March 25th, 2011, 02:34 PM
  5. Read a text file and parse the contents of file
    By HelloAll in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: March 3rd, 2011, 05:47 AM

Tags for this Thread