Thank you for your quick reply. I'm not trying to scale the entire image. Here's some clarification of my objective:
I want to capture an image of each layer in a document. The images will appear in table view cells of an iOS application. When a user taps a cell, the full-sized image will be selected on screen.
Image Processor comes close to meeting my needs, but I want it to not scale up layers which are smaller than the arguments supplied to the width and height fields of the Resize to Fit option.
Thank you very much. I was oriented towards Apple Script after seeing the Adobe Photoshop CS 6 AppleScript Scripting Reference. I'll follow the steps suggested by your pseudocode and try writing a script for Image Processor.
The Image Processors Process documents totally the resize it does resize the whole document using the Fit Image Plug-in. Its a Image size to fit the resulting document within some canvas size. The resulting image will still have its current aspect ratio. Only image that have the same aspect ratio as the target areas ratio will have that size canvas. All the others will have a canvas size somewhat smaller. All layer are resized the same percentage. The width and height Percentage are the same so the image does not distort. The resulting document canvas sides will be same size or smaller then the target sides. It depends on the two aspect ratios involved the Image's aspect ratio and the target area aspect ratio.
If you are planing on not resizing all layers the same way you best know you document design well and know the function the layer mask are being used for. Layer's with layer masks, masks would also need to be resized weather they are linked or not so they will be correct for the resulting document if all layers are being resized. In your case this could be different. Unlinked layer Masks may be for layers that are below so part of the lower layers show through where the mask is or the layer mask may the to keep the layer position over the canvas fixed.. If the whole document is not being resized things can become complicated.
I do not do web development. But what you seen to want is two view or states of your image. It seems like the may be a good place to use layer comps.