The updated image:
thanks you very much man but i wanted to do somthing little different, to cut each rectangle here as a sperate image.Lets try first to find the blue b
I'll write this in pseudo-ish-code since you should be able then to apply it to any type of image or language...
var minX = 10000
var maxX = -10000
var minY = 10000
var maxY = -10000
for (var y = 0 to height)
{
for (var x = 0 to width)
{
if (pixel(x,y).Color != transparent)
{
if (x < minX) minX = x
if (y < minY) minY = y
if (x > maxX) maxX = x
if (y > maxY) maxY = y
}
}
}
var cropRectangle = (minX, minY, maxX, maxY)
You can now use standard functions on the bitmap to get that area, which should be the area bounded by the non-transparent pixels.