Looking for a Script to Scale Selected Image to Camera Width/Height

I tend to drawing a grid of thumbnails when I’m working and it would greatly save me time if I can could easily separate those thumbs into layers and then hit a button that scales each layer to the camera width/height without stretching and then I can split those layers into new panels. There’s already script to split the layers into new panels but the scale to camera script I have not found yet.