-- Export an existing three-cell pose strip without changing its native pixels. local source=app.open(app.params.source) local strip=Image(source.cels[1].image) app.command.SpriteSize{ui=false,width=source.width*3,height=source.height*3,method='nearest-neighbor'} source:saveAs(app.params.sheet) source:close() local gif=Sprite(48,64,ColorMode.RGB) local order={0,1,2,1,0} local durations={0.65,0.12,1.0,0.12,0.3} for i,col in ipairs(order) do if i>1 then gif:newFrame() end local frame=Image(48,64,ColorMode.RGB) frame:drawImage(strip,Point(-col*48,0)) gif.cels[i].image=frame gif.frames[i].duration=durations[i] end app.command.SpriteSize{ui=false,width=144,height=192,method='nearest-neighbor'} gif:saveAs(app.params.preview) gif:close()