Seemingly, bitmap resources within my file are becoming somehow corrupted.

My code has resource bitmap image, when ran, it searches the screen for that image
and returns its xy location.

Runs fine and works fine at least once, and sometimes more, but then fails to find
the image. When I create a new image and change it within resourses the cycle begins again.

Anyone have any Idea why this might be happening?

Recommended Answers

All 4 Replies

Hey,

Is this to do with image recognition / Object recognition? Do you have any code to show, where it fails...?

The code is a quite extensive and at this time I'm not really up for trying create
a small reproducer.

If it is the image recognition code you are interested in, it is open source and licenced
under the GNU GENERAL PUBLIC LICENSE.

It is part of a scripting languge called autohotkey

I have now discovered that the bitmaps only seem to corrupt (and I use that term lightly because I dont really know what is happening, only that they need to be replaced) during testing in debug mode, release mode seems to be fine, but something must be wrong.

I'm using visual studio 2010, and win32 application.

I've done Image recognition before.. What I am trying to find out from you is that, does the image "corrupt" when you try to reconstruct it? Show me the code (if you know) where the image corrupts, i.e. I'm guessing you write the image data back to the file, correct?

No, the image I have as a resource is loaded as a HBITMAP using LoadImage API
and released using DeleteObject.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.