Solved Android Bitmap

I’ve a weird problem, which I don’t know how to solve, as this website, doesn’t give any information about it. So that is why I came here to ask you guys ^w^

Now my problem is that Bitmap is throwing an error in my face…

(Note: all the bmps are the same)

bmpImage = Bitmap.createBitmap(bmp, 0, 0, 11, 11);

^This line works

bmpImage = Bitmap.createBitmap(bmp, 0, 0, 22, 11);

^This line works

bmpImage = Bitmap.createBitmap(bmp, 11, 0, 22, 11);

^This line throws an error:

10-21 20:53:29.486: E/AndroidRuntime(27566): java.lang.IllegalArgumentException: x + width must be <= bitmap.width()

But the bitmap.getWidth() = 22 and the bitmap.getHeight() = 11 (as you can see from line 2, that is working…)
So basically I don’t know what’s really wrong about this line of code…

[Edit:] This topic should be in the android fora :-X

Never worked with Bitmap, but my guess would be that the width of bmp is less than 11 + 22 = 33 as would be needed in the last line.

Edit: because it makes a subselection starting at x=11, of width=22, so you would end up at x=33 for the right edge of the selection.

Tyvm! I always did if it were positions on the bitmap itself, but they already do -start ._.’’