Automate PNG Object - Straightening for Bulk Processing

Community Beginner ,
Jun 08, 2019

Copy link to clipboard

Copied

I'm trying find a way to automate the final steps of bulk image processing.

The final images are saved as a PNGs, uniformly sized by height and uniform transparent background size.

Perhaps there is a way for Photoshop to detect the width of the top/bottom of the PNG object, then straighten accordingly?

Currently, I spend a fair amount of time ensuring the objects are straight in Camera Raw and then move on to the automated processing below. I think the overall process would be sped up if I could move the straightening of the objects to the final step, then review and adjust each PNG as needed.

Process Overview:

0. CameraRaw

1. Masking

2. Clipping

3. PNGs

4. Resizing

5. Straightening

Thanks for any help on this topic.

Views

102

Likes

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

Automate PNG Object - Straightening for Bulk Processing

Community Beginner ,
Jun 08, 2019

Copy link to clipboard

Copied

I'm trying find a way to automate the final steps of bulk image processing.

The final images are saved as a PNGs, uniformly sized by height and uniform transparent background size.

Perhaps there is a way for Photoshop to detect the width of the top/bottom of the PNG object, then straighten accordingly?

Currently, I spend a fair amount of time ensuring the objects are straight in Camera Raw and then move on to the automated processing below. I think the overall process would be sped up if I could move the straightening of the objects to the final step, then review and adjust each PNG as needed.

Process Overview:

0. CameraRaw

1. Masking

2. Clipping

3. PNGs

4. Resizing

5. Straightening

Thanks for any help on this topic.

Views

103

Likes

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
Jun 08, 2019 0
Most Valuable Participant ,
Jun 08, 2019

Copy link to clipboard

Copied

Are the image taken so the background can be removed with an automated process like removing a chromekeyed background. The Image Processor Can Process RAW files and include an action in the image processing. It does not save PNG you Action would need to do that.  There is a better Image Processor Pro that can be downloaded  it can save PNG files. However, your action would still need to be Included in the Process. To remove the background, straighten the subject and add any required transparent borders.

I do not thought know exactly what you means where you write "uniformly sized by height and uniform transparent background size".  You  gave no information about Image size aspect ratios and orientations.

Photoshop scripting can get the canvas size and aspect aspect and other information about the the document. However, I know no way to determine if the  camera was level when the image was captured or what perspective an image may contain.  There may be no image content that would indicate if an image is straight or not. A Baseball flying through the sky. What was the camera for the shot it was not  level. All you see in the image is a baseball in the blue sky..

JJMack

Likes

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
Reply
Loading...
Jun 08, 2019 2
Community Beginner ,
Dec 18, 2020

Copy link to clipboard

Copied

I'm way behind on replying.

 

The product images (wine bottles) are taken on a white background. During processing, the background is clipped and the files are saved as a PNGs with transparent backgrounds. From this point, with the PNG, is there a way to straighten (not center, but straighten) the bottle with actions or scripts. Currently, I'm spending a lot of time in Camera Raw straightening the bottle with the cropping tool with mediocre success. I often have to go back in and readjust the the bottle.

 

I process hundreds if not thousands of bottles a week and I'm hoping to save some time. 

 

Thank you for any info on this! Sorry for the delay.

 

transparent background - image.JPG 

Likes

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
Reply
Loading...
Dec 18, 2020 0
Adobe Community Professional ,
Jun 08, 2019

Copy link to clipboard

Copied

Can you post some screenshot with image(s) and desired output result? Do your images have same dimensions and aspect ratio (width versus height)? I do not understand (probably and many others) what exactly is your task, with screenshots you will increase chance to solve the problem. Photoshop action can manage to expand canvas to some specific dimensions so you will get uniform dimensions with transparent areas around but only if images to process shares same dimensions/aspect ratios.

Likes

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
Reply
Loading...
Jun 08, 2019 1
Community Beginner ,
Dec 18, 2020

Copy link to clipboard

Copied

Thank and sorry I'm so late on getting back to this thread.

 

I also added more information to comment above. The bottles are clipped and saved as PNGs with transparent backgrounds. When resizing, all the bottles are adjusted to have the same height but the width will vary from bottle to bottle. Canvas sizes are the same and fit a 3:1 ratio.

 

From this point, with the PNG, is there a way to straighten (not center, but straighten) the bottle with actions or scripts.

 

Thank you again!

 

transparent background - image.JPG

Likes

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
Reply
Loading...
Dec 18, 2020 0
Adobe Community Professional ,
Dec 18, 2020

Copy link to clipboard

Copied

What you mean by straighten? Bottle above is straight enough. If you want to rotate bottles then it is possible in batch using action but only if all images needs some amount of "straightening". 

Likes

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
Reply
Loading...
Dec 18, 2020 0
Adobe Community Professional ,
Jun 09, 2019

Copy link to clipboard

Copied

Fig_ copy.png

Consider these two steps:

Assuming you have several tilted image files, each on a transparent background. (Fig 1)

File > Automate > Crop & Straighten Photos. -- actually just one (Fig 2)

Image > Canvas Size --  and enter a finished size: not relative (Fig 3)

Repeat for each image,  perhaps as an Action

Likes

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
Reply
Loading...
Jun 09, 2019 0
Community Beginner ,
Dec 18, 2020

Copy link to clipboard

Copied

Unfortunatly no, they aren't square. Im trying to see if there is a way to straighten product images (wine bottles). I added images to to the post above if you are interested. Thank you and sorry it to so long to get back to this thread.

Likes

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
Reply
Loading...
Dec 18, 2020 0
JJMack LATEST
Most Valuable Participant ,
Dec 18, 2020

Copy link to clipboard

Copied

I think you are just using the wrong tool the straighten your bottle.  Use ACR to develop your raw file to have good Wine bottle color with a good white background and open as the image as Background layer. Convert the Background layer to a normal layer select the white background and delete the background. Convert the layer to a smart object layer so you have the best pixel you can have for your bottle.  Use the ruler tool to straighten your bottles.  Size the canvas to you 1:3 Aspect Ratio canvas size in Pixels.  Size the smart bottle layer for the canvas and save your png. 

Capture.jpg

JJMack

Likes

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
Reply
Loading...
Dec 18, 2020 0