Copy link to clipboard
Copied
Hello!
I wonder if there is a way to batch export based on the contents of the file?
For eg. I work with clipped products (transparent pngs). I need my final output to be a 3000px 3000px image based on the clipped image (no white space).
The items I am shooting are all different sizes and angles.
Currently, I am doing this manually but I wonder if there is a script/plugin that will automate this process for me?
I have tried running an action but this won't work. It cuts off the image/uncentered.
I hope I have explained that properly.
Ok, so I have managed to get the selection to crop, I just can't get the canvas to be a square. It will size the canvas to the longest side.
By @mbenton75
Step 4: Canvas size...
Stop recording the action after the Fit Image step. The canvas should now be 3000px on the longest edge.
To record a 3000px square canvas resize, you need to prime the document so that the longest edge isn't 3000px. So either resize, crop or create a dummy document smaller than 3000px on each edge.
Then press re
...Copy link to clipboard
Copied
Have you looked into Export As or Generator/Generate Image Assets?
It should be possible to record the trim command using transparency into an action with an image size and or canvas size or fit image steps.
Can you provide before/after samples?
Copy link to clipboard
Copied
I just uploaded a sample. The objects photographed are hardly ever the same size/shape etc. The final images are sized to fully fit into a 3000px space.
Copy link to clipboard
Copied
Thanks for the screenshot, can you please post 2 or more actual images?
An action with the following basic steps should do what you need:
* Load transparency channel as selection, or Select Subject or inverted colour range selection from white
* Image > Crop (to selection)
* Automate > Fit Image (3000,3000)
* Image > Canvas Size (3000,3000)
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks for the actual sample images, it does help!
So, it was as simple as I previously wrote:
Then run the action via Automate > Batch
Copy link to clipboard
Copied
Will creating a "Ctrl Click" to select the item and continue on with the remaining steps work? I must be doing something wrong. When the action operates on the next file, it selects the same shape as the original file, and the crop to selection is not cropping to selection. So I end up with cropped images and a lot of white space around the item.
I have "loaded" the transparency selection on the channels tab, but it doesn't select the whole image. I have all the confusion.
Copy link to clipboard
Copied
Ok, so I have managed to get the selection to crop, I just can't get the canvas to be a square. It will size the canvas to the longest side.
Copy link to clipboard
Copied
Ok, so I have managed to get the selection to crop, I just can't get the canvas to be a square. It will size the canvas to the longest side.
By @mbenton75
Step 4: Canvas size...
Stop recording the action after the Fit Image step. The canvas should now be 3000px on the longest edge.
To record a 3000px square canvas resize, you need to prime the document so that the longest edge isn't 3000px. So either resize, crop or create a dummy document smaller than 3000px on each edge.
Then press record and use canvas size to 3000px on each edge. Stop recording. Your recorded action step for canvas size should now have a width of 3000px and a height of 3000px, creating a square canvas for both portrait and landscape images.
Actions are not always recorded in a linear start-to-finish manner. Sometimes you need to record and stop, insert menu items, setup the document in another manner, record again etc.
Hope this helps.
Copy link to clipboard
Copied
Goodness gracious! You sir, are a LEGEND! I have been working my same tedious process for years! 1) I have always found actions intimidating 2) I always just put it off because I just needed to get that week's job done. I got close a couple of times but was always just missing one tiny element. It all worked perfectly! Me and my wrists are so thankful for your knowledge!