Hello, the book does have some basic concepts about graphics (like how usually game engines have texture origins on the top left corner), but I'm not sure it will be able to give you a surefire solution to your problem.
I noticed that your example is missing the actual call to "crop_texture" at the end:
crop_texture(image_path, texture_rect, texture_rect_offset, output_path)
Did you forget to paste it, by any chance?
If any errors arise from that, I can try and give you some pointers.