Copy link to clipboard
Copied
I have a complex task at hand for a manufacturing business.
I have folders of images on an external drive, and some of these folders also have sub-folders containing images.
The images at the first folder level are JPG format. I moved PNG, GIF, or TIFF images to a new sub-folder by their respective format in case these need to be processed separately.
The JPG images in the first folder and the sub-folders need to be converted from JPG to PNG, but the complex situation is getting these images to have proper transparency where applicable. Images with a lot of white space within the image need to have the white space converted accurately to become transparent.
Is there a way to process all of these folders using one ore more automated tasks to arrive at transparent PNGs?
I am using the Adobe Creative Cloud desktop apps on Windows 11 Pro 23H2.
I have seem some code script examples that do various things, but I now nothing about composing and executing scripts.
As I previousy wrote, it depends on the variables of the original images.
In this example image that you posted, the challenge is the over-exposed cable, lower resolution and the poor quality JPEG compression. This will mean that some images will need manual edits for the best quality, either before or afterwards. In this case, recreating a cable where it is blown out (although cloud selection provided a better but slower result than local).
Using a couple of simple custom actions and the Im
...Copy link to clipboard
Copied
For example, how does a script like this get executed?
Copy link to clipboard
Copied
The JPEG files will be flattened, so no transparency. The white background may or may not be pure white due to lossy compression damage. This may or may not be an issue for cleanly removing the white backgounds.
PNG can technically contain transparency, so this will depend on the images themselves on whether they have white backgrounds or not.
GIF may or may not need conversion to RGB from indexed colour mode, depending on the task.
TIFF does support layers and transparency, so like the PNG it will depend on the images.
Processing the root/parent folder and sub- directories shouldn't be the big concern... I'm more interested in what needs to happen to each file based on its current state and file format limitations.
Providing representative sample images in each file format would be a good place to start to seek advice, unless you have this down using actions for batch processing.
Batch processing possibilities include:
Batch Actions:
https://helpx.adobe.com/photoshop/using/processing-batch-files.html#process_a_batch_of_files
Image Processor with PNG from the late Mike Hale:
https://www.ps-scripts.com/viewtopic.php?f=51&t=10225&p=54270
Image Processor Pro:
https://sourceforge.net/projects/ps-scripts/files/Image%20Processor%20Pro/v3_2%20betas/
Picture Processor:
https://github.com/Paul-Riggott/PS-Scripts/blob/master/Picture%20Processor.jsx
Raw Image Converter:
https://github.com/SetTrend/Raw-Image-Converter
Batch Multi Save:
https://www.marspremedia.com/software/photoshop/batch-multi-save
Instructions for saving and running 3rd party scripts:
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Thanks for the insightful reply. I am not sure what to do at this point. The set of folders and sub-folders is 20+ gigabytes in size. The business owner would like to maintain the hierarchy of folders, so I am not sure if this has any impact on the processes that would run. If I bring a single image into Photoshop, I am realizing where the "remove background" button is capable of removing the unwanted content in order to achieve the desired transparency. However, there are lots of images that I suspect would have to be edited manually to arrive at transparency.
Copy link to clipboard
Copied
If I bring a single image into Photoshop, I am realizing where the "remove background" button is capable of removing the unwanted content in order to achieve the desired transparency. However, there are lots of images that I suspect would have to be edited manually to arrive at transparency.
By @DDmUSA
This is always the challenge. You need to work out how each file format and specific image content will need to be automated or semi-automated.
Copy link to clipboard
Copied
Here is a complicated image. I am seeking a process that can traverse a set of folders and sub-folders to end up with two files for each starting image. The first file should be the same dimensions as the starting image and saved as a PNG with transparency. The second image should also be a PNG with transparency with the image occupying an 800x800 canvas to comply with the minimum size of a product image for the website shopping cart. With the awful shadowing in this example, it's not so straightfoward to remove it.
Copy link to clipboard
Copied
As I previousy wrote, it depends on the variables of the original images.
In this example image that you posted, the challenge is the over-exposed cable, lower resolution and the poor quality JPEG compression. This will mean that some images will need manual edits for the best quality, either before or afterwards. In this case, recreating a cable where it is blown out (although cloud selection provided a better but slower result than local).
Using a couple of simple custom actions and the Image Processor Pro script...
The original size action retains the position, just removes the background.
The 800px square action centres the extracted product in the centre of an 800px canvas.
And here is the result: