|
-
Nov 14th, 2001, 01:23 PM
#1
Thread Starter
Addicted Member
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
-
Nov 14th, 2001, 01:29 PM
#2
Frenzied Member
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.
-
Nov 14th, 2001, 01:36 PM
#3
Thread Starter
Addicted Member
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
-
Nov 14th, 2001, 01:45 PM
#4
Frenzied Member
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!
-
Nov 14th, 2001, 02:37 PM
#5
Thread Starter
Addicted Member
ok. for now u can set a picture for p1.picture and run the program
-
Nov 15th, 2001, 01:16 AM
#6
Thread Starter
Addicted Member
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
-
Nov 15th, 2001, 11:20 AM
#7
Frenzied Member
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.
-
Nov 16th, 2001, 03:52 AM
#8
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|