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

Image cropping and saving actionscript help.

Community Beginner ,
Jul 27, 2019 Jul 27, 2019

Copy link to clipboard

Copied

I have as that I want to save individual sections of each image in a numerical format...

For example:

Image = 256 x 2048 (4 sections of 256x512 to be saved individually)

End result should be 4 .tga files that are 256 x 512 and saved as:  Example-1.tga, Example-2.tga, Example-3.tga, Example-4.tga

which should equal 4 parts of a total image of 256x2048

actionscript process I'm trying but not working..

Marque preset size set to 256x512

  1. Selected section 1 Marque preset size
  2. Crop
  3. Saved as example-1.tga
  4. undo (step backwards) to original image
  5. select section 2 Marque preset size
  6. crop
  7. saved as as example-2.tga
  8. undo (step backward) original image
  9. select section 3 Marque preset size
  10. crop
  11. saved as as example-3.tga
  12. undo (step backward) original image
  13. select section 4Marque preset size
  14. crop
  15. saved as as example-4.tga
  16. undo (step backward) original image

For some reason recorded actionscript errors / stops at the undo option like it doesnt recognize this part..

So was wondering if anyone might be able to clarify this to what and or how it should work correctly.

I am trying to figure out if this can be done instead by using slice and or guides to make this process doable..

TOPICS
Actions and scripting

Views

328

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
Adobe
Community Beginner ,
Jul 27, 2019 Jul 27, 2019

Copy link to clipboard

Copied

Typo on First Line:

"I have and Image that I want to save individual sections of each image in a numerical format..."

I have been watching several videos on using the slice option but they all lead back to using the export for web option which does not have the option to export as .TGA, only .png and jpeg formats.. If anyone could point me in the right direction how to go about making this an easier workflow process,  I would be greatly appreciated.

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 ,
Jul 27, 2019 Jul 27, 2019

Copy link to clipboard

Copied

I would actually create a duplicate file, crop, then save it. Then go back to the original file, and do the other crops.

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 ,
Jul 28, 2019 Jul 28, 2019

Copy link to clipboard

Copied

As I’m new to scripting, I would also dupe the file and create the new name adding the number suffix on the dupe, then save. The suffix could also be added on the save step, however, I think it would take me more work to do so.

Do you specifically need to crop to fixed output sizes from a fixed input size, or would it be better to simply crop into quarters from a variable sized input image?

What save options for Targa do you require?

Where are the four image tiles being saved, i.e. the same location as the original full-size image?

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 ,
Jul 29, 2019 Jul 29, 2019

Copy link to clipboard

Copied

This can also be done using the Image Processor Pro script...

Four file type processing steps would be added, each for a different quadrant of the image. An action would also have four matching crop steps (I used canvas size) that would be referenced in each file type processing tab and the filename suffix would also be added as required.

IPP.png

Before:

before.png

After:

after.png

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 ,
Jul 29, 2019 Jul 29, 2019

Copy link to clipboard

Copied

LATEST

I feel the simplest way an action can do what you want to to is dupe the document flatten the dup.  Make for layers selection 25% wide full height selection of the background layer delete the background and export layers to files. If you remove the Duplicate document from my action you can batch the action using menu File>Automate>Batch.

Capture.jpg]

JJMack

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