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

pattern fill action

Guest
May 02, 2016 May 02, 2016

Copy link to clipboard

Copied

i am fashion designer . i have 5000 pattern image (160*160) jpg format .that all image convert to 1920*1080 image format. using  automate action batch or Photoshop Scripting?

rrr.jpg

TOPICS
Actions and scripting

Views

900

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

correct answers 1 Correct answer

Community Expert , May 02, 2016 May 02, 2016

Try this script. Open one ofthe pattern files first.

#target photoshop

app.preferences.rulerUnits = Units.PIXELS;

var doc = activeDocument;

doc.activeLayer.isBackgroundLayer = false;

canvasSize (1080, 160);

for(var i=0;i<6;i++){

    dupLayer ();

    doc.activeLayer.translate(160,0)

    }

doc.flatten();

doc.activeLayer.isBackgroundLayer = false;

canvasSize (1080, 1920);

for(var i=0;i<11;i++){

    dupLayer ();

    doc.activeLayer.translate(0,160)

    }

doc.flatten();

function dupLayer(){

    var id3 = charIDToTypeID

...

Votes

Translate

Translate
Adobe
Community Expert ,
May 02, 2016 May 02, 2016

Copy link to clipboard

Copied

Try this script. Open one ofthe pattern files first.

#target photoshop

app.preferences.rulerUnits = Units.PIXELS;

var doc = activeDocument;

doc.activeLayer.isBackgroundLayer = false;

canvasSize (1080, 160);

for(var i=0;i<6;i++){

    dupLayer ();

    doc.activeLayer.translate(160,0)

    }

doc.flatten();

doc.activeLayer.isBackgroundLayer = false;

canvasSize (1080, 1920);

for(var i=0;i<11;i++){

    dupLayer ();

    doc.activeLayer.translate(0,160)

    }

doc.flatten();

function dupLayer(){

    var id3 = charIDToTypeID( "CpTL" );

    executeAction( id3, undefined, DialogModes.NO );   

    }//end function duplayer

function canvasSize (horNum, VertNum){

    var idCnvS = charIDToTypeID( "CnvS" );

        var desc4 = new ActionDescriptor();

        var idWdth = charIDToTypeID( "Wdth" );

        var idPxl = charIDToTypeID( "#Pxl" );

        desc4.putUnitDouble( idWdth, idPxl, horNum);

        var idHght = charIDToTypeID( "Hght" );

        var idPxl = charIDToTypeID( "#Pxl" );

        desc4.putUnitDouble( idHght, idPxl, VertNum );

        var idHrzn = charIDToTypeID( "Hrzn" );

        var idHrzL = charIDToTypeID( "HrzL" );

        var idLeft = charIDToTypeID( "Left" );

        desc4.putEnumerated( idHrzn, idHrzL, idLeft );

        var idVrtc = charIDToTypeID( "Vrtc" );

        var idVrtL = charIDToTypeID( "VrtL" );

        var idTop = charIDToTypeID( "Top " );

        desc4.putEnumerated( idVrtc, idVrtL, idTop );

        var idcanvasExtensionColorType = stringIDToTypeID( "canvasExtensionColorType" );

        var idcanvasExtensionColorType = stringIDToTypeID( "canvasExtensionColorType" );

        var idBckC = charIDToTypeID( "BckC" );

        desc4.putEnumerated( idcanvasExtensionColorType, idcanvasExtensionColorType, idBckC );

    executeAction( idCnvS, desc4, DialogModes.NO );

    }

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
New Here ,
Nov 19, 2016 Nov 19, 2016

Copy link to clipboard

Copied

hi helpful one but whether i want to know if it is possible to ask a user input for duplicating how many times both vertical and horizontally if possible let me know how to make that

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 ,
Nov 19, 2016 Nov 19, 2016

Copy link to clipboard

Copied

LATEST

You would need to make a UI first so that a user could input the numbers they wanted. Then you can change line 9 in the above code to enter the number horizontal. You would change the number 6 to the variable you used in your UI. Same with line 18. Replace the 11 with the variable from your UI for the number of patterns to place vertically.

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