There is a tool you can use to do it manually that is relatively painless:
http://tech-tutors.net/downloads/
And there is a tutorial here:
http://www.youtube.com/watch?v=smOtRuxoIs8
I can share something automated on github if people are interested, the main catch is that if the frames are not even in size which is common, you may need to adjust them manually anyway.
What normally happens when I work with sprites is that the frames are put into an even grid for ease of use. Then every sprite depending on the frame size is in (j * FRAME_WIDTH, i * FRAME_HEIGHT);
.
If that is not the case cause the artist is not aware of programming needs, I cook up a tool that displays the sprite sheet on screen and saves my click's (mouseX, mouseY)
positions into a file. I then use that file to split the spritesheet.
I can elaborate on how to create a tool like this or you could use Ivan's advice.
If you do go with making a tool, you may want to both save the first click (for frame's top-left corner, and another click in the bottom-right to get the width and height).
I personally prefer the grid method, have your artist or friend cut and paste the frames into an even grid made of sufficiently large blocks. It would save you time if you have several sprites. Otherwise if there are many spritesheets and they are not in an even grid, you may want to cook up a tool or look for one online(I am not aware of any). They are not difficult to make.
I can upload the source for the tool I use myself to a github for you to download. It saves the results into a text file organize by a list of four values for each frame.
example:
x, y, width, height, x2, y2, width2, height2, ... ,xn, yn, widthn, heightn
You will have to sort (in the code which frame is which) to use the animation correctly.