Results 1 to 8 of 8

Thread: can ANYBODY debug this please???

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    shiraz
    Posts
    163

    Unhappy can ANYBODY debug this please???

    Hi guys
    Well I am developing an app which can read a bitmap image and right down the x,y and color of each pixel in a random access file. The length of each record is 15 (3 for x,3 for y, and 9 for color) and of cours it refuses to right down the record of an specified pixel(white by default).
    For doing this I load my image into a picture box, set the autosize to true and scalemode to pixel, then I use an API function to get each pixel of my picturebox color and so….
    It works for small images but as I give it a bigger image something strange happens. I have attached 2 images. The app works with the smaller image and u can see the result in the second picture box. Now try the bigger image (this babe) and see what happens. I couldn’t relize what’s the reason and I’m getting really pissed of. Oh my god!!!
    Can anyone debug this? I’ll be very thankfull. Ok it’s late at night here and I’m going to sleep so that’s the reason I may not reply ur post 4 next 6 houres. Sorry 4 that.
    Oh the site doesn’t accept my image. U can use 2 images yourself. One an iconsize image another a 300*300 or so.
    Thank u

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Hey there's a bug in your code, it won't open any image. If I open "C:\pics\test.bmp" it says "file not found "c:\picstest.bmp" which is really screwed, you're missing a "\" in there.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    shiraz
    Posts
    163
    for now that's not important that much i can fix that easily. what making me mad is that why the app functions like this while reading bigger images

  4. #4
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Functions like WHAT?!? I can't even get it to load a picture! Can't fix the bug you're talking about until you fix the other one!
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    shiraz
    Posts
    163
    ok. for now u can set a picture for p1.picture and run the program

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    shiraz
    Posts
    163

    Thumbs up thanks aloooooot

    oh thank u very much. u 've done great and i'm again getting disappointed of myself coz even i can't understand what part of the code was faulty. where did u made change in the code?
    againg thank u very much master

  7. #7
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Yes there was a change in the code.

    Firstly I changed the loops so that X looped to XMax instead of YMax.

    Secondly: you were sending strings to the API, when it wanted Longs. I changed the code to send Longs instead of Strings.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    shiraz
    Posts
    163
    oh i see
    the first one was misstyping but the second one: yes i didn't notice that.
    thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width