Copy link to clipboard
Copied
I have a large collection of inconsistent JPG images with high resolution that I need to resize, crop, and compress for web use. The main challenge is automating multiple actions. Here is what I would like to achieve:
1. Convert the images into smart objects.
2. Slice the images into parts, (required for horizontal images).
3. Remove watermark/numbers (if present in the image)
4. Blur background (to increase focus on the subject)
5. After that, detect the main subject and crop them with a 150px top and 100px bottom margin around the subject.
6. Next, resize the images to specific dimensions, such as 800px wide and 1000px tall, while maintaining a 4:5 aspect ratio.(if image dimensions are bigger than that)
7. Convert the images to the WebP format, aiming for a file size between 100-200kb.
8. Export the images while preserving the sub-folder structure of the original source folder.
Is it possible to automate this process, either fully or partially? Please guide me, I will highly appreciate your kind help
Copy link to clipboard
Copied
Is it possible to automate this process, either fully or partially? Please guide me, I will highly appreciate your kind help
By @raeen
This is hard to answer without a broad sample of images and more specific info on the requirements.
#1 - Creating a SO should be no problem, but should this happen as the first step or after you "slice"?
#2 - Examples would help, I'm not sure if you mean slice as in slicing for save for web or simply cropping?
#3 - Samples are needed, however, this may be a barrier for automation. Why can't you get clean originals, why are there numbers/watermarks and is it ethical to remove them?
Etc.
Tackle each step one at a time, then see if you can make a combined, cohesive workflow from each separate step.
Copy link to clipboard
Copied
Think there is a source folder and it has 200 sub-folder.
Each sub-folder has product pictures of one product/style.
Some sub-folder have only portrait images, some have only horizontal images and some have mix of both.
Most horizontal images are composite of two portrait images. When we select the slice tool, the tool automatically snaps into 2 parts(when we divide slice vertically in 2 parts)
I want all images in portrait form to use on the website
To my understanding, it would be better to first convert all images into smart object
Then slice/split horizontal images into 2 parts and save each individually.
Up to this point, all images would be in portrait hence cropping/resizing images in batch would be possible.
There is no issue of copyright to remove name/numbers as we have permission from the owner
Copy link to clipboard
Copied
That explanation helps a bit.
I doubt that the slice tool is going to help with automation. Easier to just adjust canvas size to 50% width for left and right sides.
A script can differentiate between landscape and portrait and process accordingly, but how to auto process landscape if they are not all actually a 2up combined image??? Filename? Metadata?
Copy link to clipboard
Copied
If I save slice images into png then convert those(PNGs) into smart object that would be ok too.
Does Photoshop have something known as logic/conditions?
Like, run this action to all these folders, slice, and export images into PNG only if the images are in JPG and are horizontal
Copy link to clipboard
Copied
Does Photoshop have something known as logic/conditions?
Photoshop actions have a limited range of "conditional" options:
https://helpx.adobe.com/au/photoshop/using/conditional-actions-creative-cloud.html
Scripting offers more possibilities, an example here:
http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html
There are many more conditions that scripting can check, above and beyond what is mentioned above.
Edit - Some other simple scripting conditional examples:
https://prepression.blogspot.com/2022/11/photoshop-action-helper-scripts.html
https://snipit.io/public/collections/22660/22660
Copy link to clipboard
Copied
3. Remove watermark/numbers (if present in the image)
By @raeen
sounds like smth illegal...hm
Copy link to clipboard
Copied
Don't worry, I have permission
Copy link to clipboard
Copied
This would likely be a major roadblock to automation, but without seeing samples it is hard to know. Much better to get versions without numbers or watermarks if you have permission to remove them.
Copy link to clipboard
Copied
There are 2 options that could be done to overcome this
Here background removal won't be precise on all images and it will take more computing power and time and manual adjustment to some images will be required.
Hence I have decided to go with the 2nd option which is to blur the background, it solves all problems at once and it can be automated completely to my knowledge.
I know to know your opinion on this.
Copy link to clipboard
Copied
We cannot give any help or advice in these forums with removing watermarks, it would break forum guidelines. Doing so will get the thread locked. That includes editing them out by blurring.
Watermarks are there for a reason. If you have permission from the owner(s) to use their images, then go to those owner(s) and get unwatermarked copies.
Dave
Copy link to clipboard
Copied
okay, I got images without a watermark, can you help now?
Copy link to clipboard
Copied
okay, I got images without a watermark, can you help now?
The please post one of those images.
Copy link to clipboard
Copied
Please provide at least one original image and the resulting file/s you want to create to clarify your point.
Do you understand what (the advantages of) Smart Objects are?
»Hence I have decided to go with the 2nd option which is to blur the background, it solves all problems at once and it can be automated completely to my knowledge.«
How would this solve the problem of creating a decent selection of the subject of the image?
Are you referring to the »Depth Blur«-Neural Filter?
Copy link to clipboard
Copied
So here is the original image I received from the owner without a watermark or number. Below are the steps I took to obtain the desired image (referred to as processed image 1 & 2):
Currently, it is not possible to automate all of these steps together, especially step 2. Therefore, I suggest saving the sliced images as smart objects or PSD files to avoid losing quality. Then, perform each processing step one by one and finally export all the images in webp format.
I have attached original image and desired image(after processing) with the hope to get a reply
Copy link to clipboard
Copied
Convert an image into a smart object doesn't magically avoid quality loss. Just take that step out of the process.
Copy link to clipboard
Copied
Okay, except smart object step, can you guide how to automate rest of the steps? or any of the the steps?