It will depend a lot on the artwork and what effect you want to accomplish and how much time you want to spend on it.
Do you need the to work with every single object? Or just some wieldable ones (like swords and sticks). If its just some then I would probably just have a separate set of sprites.
If you are looking to do rotations on pickup and you are doing pixel art (via a pixmap/bitmap image) then manipulating the original image won't work very well. It will possibly blur (if you have some kind of antialiasing) or it might loose a lot of detail (if there is no antialiasing pixels can disappear or 'tear').
You could try using much higher resolution graphics or even better (but much more complex to program) vector art, so manipulations don't have as many visual issues.
A simple 90° bitmap rotation would work without any distortions. It could allow the stick to be flat on the ground and upright when held, 45° wouldn't be too bad either. But some items won't make sense (a cup of water might look weird when left on the side), so you might need to provide a rotation 'hint' with the sprite/object.
You will need to track the location of the hand, you might also need to have some bits that are drawn under the item or over it. For example fingers. It might also be reversed when the character is facing the other way.
It might be an idea to have some rigging like you would with a 3d mesh. For a simple setup, I would probably make a separate character sprite (or another layer) that just has a couple of pixels in a few color keys. The Red pixel might be the left hand position. Blue for right. You can add other colors for things like the head, torso, legs, knees, feet and so on which would allow things like helmets, armour, pants, shoes and so on. Just scan though the pixels for the 'slots' (there are probably more efficient ways of packing it, but don't make more work for yourself). You might also be able to use different colors to specify if the object should be drawn after to before the character sprite (ie will the hands obscure the object). You could make a fingers a separate 'object' if you need that level of complexity (ie the fingers drawn over the object but the palm of the hand behind it).
Otherwise if you just need a few specific items, swords and such rather than every object in existence I would probably just have a animation for 'guy with sword' 'guy with axe' 'guy with stick' and so on. Maybe just have them overlay the generic 'guy' character sprites. But remember an attack animation with a sword will probably be different to one with an axe so setting up some overly complex setup would just get in the way their.
Maybe you can offer some colour pallet options so you could have a wooden sword or a steel one with the same sprites just with different colours.