Hi Jean-Patrick,
I've just had a look at the code, and it seems you've misunderstood the purpose of the `mask` keyword argument. This is not the morphological structuring element, but a binary mask overlaying the entire image and determining which pixels can and cannot be part of the skeleton. See the relevant part of the code here:
My intuition is that your calls should have resulted in some kind of ValueError (since you are indexing an array with a boolean array of a different shape), but evidently that's not true. We'll have to look into updating the docs and maybe adding some input sanitising.
As to your broader question, I don't think it's possible with the current codebase to do what you ask. We would need to update the lookup table connectivity parameter, which is currently hardcoded here:
Is there any reason why you can't just use Mahotas? =)
(Incidentally, the resolution on your characters is pretty low, which explains the wonky skeletons... Thicker characters should produce more regular skeletons, regardless of connectivity.)
Juan.