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 10 of 10

Thread: encode a png image in ascii format..

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default encode a png image in ascii format..

    I have a .png image cubes puzzles and have to print the solution(s) in ASCII format into a file in unfolded format.I do not need to create a "reader" for the input pieces just encode the input pieces directly..Now I need an expert advise as how to start doing this task.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: encode a png image in ascii format..

    What is ASCII format?
    What are "solutions"?

    How do they relate to an image?

  3. #3
    Junior Member
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: encode a png image in ascii format..

    cubes.jpg

    attach is the image
    and the task is ::


    Cubes Puzzle Task

    Create a computer program that solves the given cubes puzzles and
    prints the solution(s) in ASCII format into a file in unfolded format
    as given below as an example.

    - You do not need to create a "reader" for the input pieces. Just
    encode the input pieces directly into your program in your
    programming language of choice.

    Here is an example:
    The pieces of the blue cube look as follows:
    o o o o o
    ooo ooooo oooo
    ooooo ooo oooo
    ooo ooooo oooo
    o o o o o
    o o o o o o
    oooo ooooo oooo
    oooo ooo oooo
    oooo ooooo oooo
    oo o o o oo oo

    One of the solutions in "unfolded form" looks as follows:
    o o o o o
    ooo ooooo ooo
    ooooo ooo ooooo
    ooo ooooo ooo
    o o oo o
    o o
    ooooo
    ooo
    ooooo
    o o
    o o o
    ooooo
    ooo
    ooooo
    o o o
    o o
    oooo
    oooo
    oooo
    oo o
    Now someone please help me out!!!

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: encode a png image in ascii format..

    Now someone please help me out!!!
    Explain the algorithm for what you want to do. You need to explain a lot more details than your last post provided.
    Did you answer the questions I asked in my first post?

  5. #5
    Junior Member
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: encode a png image in ascii format..

    for your first post i ve provided you the complete assignment..I dont know how to work on it have not written any algorithm yet

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: encode a png image in ascii format..

    I have no idea what you are trying to do. Unless you can describe what the input to the program is and what the output is supposed to be and what the steps are to create the output, given the input, it is impossible to design a program.

    What information did you give in post#3? I see lots of the letter o spread over several lines and some with spaces between them. The pattern shown makes no sense.

  7. #7
    Junior Member
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: encode a png image in ascii format..

    Ok the input is the image having puzzle pieces of different colors.
    And the ouput is supposed to be a cube. for example blue color pieces joined together to make a blue cube and same for all the other color pieces make their respective cubes.
    The steps which i have to take in order to produce output is the question of help.
    In post#3 ive have given you the whole problem and that o is the ASCII format according to my understanding.
    If you see deeply these o example is of blue color puzzle pieces which is encoded in the form of o .

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: encode a png image in ascii format..

    There are so many unanswered questions:
    For example how is a "cube" represented in memory or in a file?
    How does the contents of an image get scanned for meaning?
    What is the meaning of the pattern of the letter o that you posted?

    There is not enough information in what you have posted to understand what you are trying to do.
    Good luck with your project.

  9. #9
    Junior Member
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: encode a png image in ascii format..

    According to my understanding i have to take input this image and encode in ASCII Format i.e o format that i dont know how to do it.
    Then match each one pieces to the other to see if it fits well .. this too i dont know how to do it
    And finally produce thge output in that o form

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: encode a png image in ascii format..

    I have never heard of "ASCII Format"
    I have no idea how to take the contents of an image and convert it to the contents of a text file.
    I have no idea what "o format" is?

    Where are you getting these terms?

Similar Threads

  1. Encode and decode - Caesar cipher
    By siabanie in forum Java Theory & Questions
    Replies: 1
    Last Post: October 7th, 2011, 06:25 PM
  2. 8 bit binary to ascii
    By grahamb314 in forum Algorithms & Recursion
    Replies: 5
    Last Post: May 6th, 2011, 05:22 AM
  3. How to convert BCD to ascii
    By slavicp in forum Java Theory & Questions
    Replies: 1
    Last Post: April 5th, 2011, 02:20 PM
  4. How Convert a Byte array to a image format
    By perlWhite in forum Algorithms & Recursion
    Replies: 7
    Last Post: February 19th, 2011, 03:16 PM
  5. Saving an image file (PGM format)
    By Mickey2315 in forum Algorithms & Recursion
    Replies: 3
    Last Post: September 12th, 2009, 01:18 AM