I'm in the process of creating a script that does the reverse of sprite_tape-0.3.py (that is, it takes a "tape" of frames in one layer and transforms it into an image the size of a single frame, with one layer per frame). The way I did this was to clone the original layer n-1 times (n frames for the sprite), then reposition each layer so that the desired frame is at image (0,0), then resize the image to the size of a single frame.
The problem is that the layers are all still the original size and I need them to be the size of the image. I can do this manually by using "Layer to Image Size" on each layer, but I'd prefer it to be done by the script.
Am I going about this the wrong way? Should I be moving the layer data to position the desired frame at layer (0,0)?