Sprite walking and rotating through pixel terrain

Hello, i´m having a problem to figure some 2D collision detection to be usable for my walking algorithm for my pixel based terrain.
I load a image as a terrain and create a destructable terrain just like worms. The problem is walking through the pixels and rotate the sprite at X degrees to follow the terrain inclination . I had not succeeded to find any good solution to my problem.
I tried to put some pre-defined points to collide to the terrain and do some rotating actions, using alpha channel of the image to determine if it has a terrain or not, but it is far from accurate, it do some weird things when rotating. The points invades the terrain when rotating, invalidating all my algorithm.
Does anyone has a clue or a link for an example of some sort of algorithm that might be useful? Maybe i just thought a good way but used wrong.

Well I would say get current pixel Data from the Image, for example using (Writable) Raster. Get the current Pixel you are on, get the left and right neighbour and get the angle between these two as current rotation.

But I never progged it, althoug I had something similar on my mind for some time. So its not guaranteed to work. Maybe you have an error in your algorithm, did you run some tests and check some logs?

-JAW