• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

automate impossible to achieve task. A challenge for photoshop actions/script Gurus

Community Beginner ,
May 17, 2023 May 17, 2023

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

TOPICS
Actions and scripting

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2023 May 17, 2023

Copy link to clipboard

Copied

quote

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2023 May 18, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2023 May 18, 2023

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2023 May 18, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied


Does Photoshop have something known as logic/conditions?


 

Photoshop actions have a limited range of "conditional" options:

 

conditional-action.png

 

https://helpx.adobe.com/au/photoshop/using/conditional-actions-creative-cloud.html

 

conditional-atn.png

 

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

quote3. Remove watermark/numbers (if present in the image)

 

By @raeen


sounds like smth illegal...hm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

Don't worry, I have permission

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2023 May 18, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

There are 2 options that could be done to overcome this

  1. Remove background completely
  2. Blur background

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.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 19, 2023 May 19, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 19, 2023 May 19, 2023

Copy link to clipboard

Copied

okay, I got images without a watermark, can you help now?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2023 May 20, 2023

Copy link to clipboard

Copied

quote

okay, I got images without a watermark, can you help now?

The please post one of those images. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2023 May 20, 2023

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? 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 20, 2023 May 20, 2023

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):

  1. Automatically slice the vertical image into two parts and save each part as a PNG file.
  2. Open one of the slices and crop the image to conform to a 4:5 ratio. If there are white vertical bars on the left and right sides of the image, select them and fill them with the content-aware tool.
  3. After that, use the "Select Subject" tool to select the subject and then inverse the selection to select the background.
  4. Apply a Tilt-Blur effect to the background, directing it towards the bottom.
  5. Next, resize the image to be 800 pixels wide and 1000 pixels tall.
  6. Save a copy of the processed image in the webp format.

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 21, 2023 May 21, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 21, 2023 May 21, 2023

Copy link to clipboard

Copied

LATEST

Okay, except smart object step, can you guide how to automate rest of the steps? or any of the the steps?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines