Search:

Type: Posts; User: morob05

Search: Search took 0.19 seconds.

  1. Replies
    11
    Views
    1,978

    Re: Problems reading a pgm-file (pixel gray map).

    Yes i print out all the values of b in the end of my main. All the white space has value 255, but is read as 711. The extra grey-tone in the image has value 150 (i think) and is read as 8225. All the...
  2. Replies
    11
    Views
    1,978

    Re: Problems reading a pgm-file (pixel gray map).

    No i have not. I'm not familiar with HexEditors?? How do i do this? I just tried some different ways of converting b in the above snippet to a byte and then converting it to an int when i load it in...
  3. Replies
    11
    Views
    1,978

    Re: Problems reading a pgm-file (pixel gray map).

    Got it working now. Also found out that i accidentally pasted the wrong code above, i had so many different projects open trying different versions of this code, lol. I'm still not sure what went...
  4. Replies
    11
    Views
    1,978

    Re: Problems reading a pgm-file (pixel gray map).

    Hi Norm. Thanks a lot for your reply, it is appreciated ;) So i should put that little snippet at the end of my code right?? I'll try that and see if i can find out what goes wrong :) I may post...
  5. Replies
    11
    Views
    1,978

    Re: Problems reading a pgm-file (pixel gray map).

    I'm not sure what you mean? I did print the contents of the array both in my previous post and in my code. This is how it looks in my console-window:

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
  6. Replies
    11
    Views
    1,978

    Problems reading a pgm-file (pixel gray map).

    Hi.

    First merry christmas to everyone :)

    I've been struggling with some java code to read a pgm-file. I've looked searched a lot on the internet and looked at several different examples and my...
Results 1 to 6 of 6