Photoshop Logo Resizing Script

Im trying to build a script that is slightly complex. In short, the script will take logo images of any given dimensions and create eight different output files with a combination of horizontal/vertical dimensions and four different Layer Styles. Anyway, I don't have much experience with Photoshop scripting, and I've been looking through the official reference, but there are a few things I can't find.
How to resize either a layer or a selection with constrained proportions (ie, I only specify the height or width, and the object retains its original aspect ratio)
How to center a layer with a script. Without a script I would; select the whole document, Layers>Align Layers to Selection>Vertical Centers, Horizontal Centers.The ability to move a layer or a selection would work as another option, but, suprisingly, I couldnt find how to do that either.
How to apply Layer Styles with specific parameters, How to Remove Layer Styles
If anyone can help me with any of these, I would appreciate it! Thanks!

I think all of what you want to do can be done in an action which would be much easier then writing a script. 
However there are script that you can download that can help you learn to order layers and add layer styles in a scripts for example http://morris-photographics.com/photoshop/scripts/sort-layers.html. Have not seen any that transforms layers or selections you may want to install the ScriptListener plugin and do some transforms to see if you can come up with a function to do the transforms you want, You may need to enter both width and height you should have no problem constraining the transform to the origimal aspevt ratio for you can get canvas size and layer size in a script.
I think I may have done a major portion of what you want to do in an action.  My crafting actions package contains a sample action that add three watermarks to any size document and sizes the watermarks for the document size.  The three sample watermarks include a custom colored logo a custom shape and a custom text layer.
Package
http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
Contains:
Action Actions Palette Tips.txt
Action Creation Guidelines.txt
Action Dealing with Image Size.txt
Action Enhanced via Scripted Photoshop Functions.txt
CraftedActions.atn Sample Action set includes an example Watermarking action
Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.
12 Scripts for actions

Similar Messages

  • Simple Resizing Script - Hopefully better eyes will prevail

         I'm working on a simple resizing script to incrementally resize an image in 5% steps up to the set limits as defined by the variables; newImageHeight & newImageWidth.   I'm currently running this script in Photoshop CS4 on an Intel Mac.
         The script works fine for horizontal format images but vertical images scale incrementally in significantly larger steps than 5% and the final output is well above the limit set by the variable "newImageHeight".
         I'm sure it's something simple that I've just overlooked.  Any help would be most appreciated.
    TIA
    #target photoshop
    //  Sets Adobe Photoshop to use pixels and display no dialogs.
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = app.activeDocument;
    var imageFormat;
    var newImageHeight = 4000;  //  Sets the new image height to 4000 pixels.
    var newImageWidth = 2880;  //  Sets the new image width to 2880 pixels.
    if (doc.height.value > doc.width.value){  //  Determines whether the image is vertical or horizontal in format.
         imageFormat = 1;
         }else{
         imageFormat = 2;
    if (imageFormat == 1) {
         alert("Re-Scale Portrait Format");
         while (doc.height.value < (newImageHeight * 0.923550372529964)){
              alert(doc.height.value);
              doc.resizeImage (doc.height * 1.05), ResampleMethod.BICUBIC;
         alert(doc.height.value);          
         doc.resizeImage (doc.height * (1 / (doc.height / newImageHeight))), ResampleMethod.BICUBIC;
         }else{
              alert("Re-Scale Landscape Format");
              while (doc.width.value < (newImageWidth * 0.923550372529964)){
              alert(doc.width.value);
              doc.resizeImage (doc.width * 1.05), ResampleMethod.BICUBIC;
         alert(doc.width.value);     
         doc.resizeImage (doc.width * (1 / (doc.width.value / newImageWidth))), ResampleMethod.BICUBIC;
    //  EOF

    Check resizeImage out the Object Model Viewer in ESTK.
    Document.resizeImage (width: UnitValue , height: UnitValue , resolution: number , resampleMethod: ResampleMethod )
    So I think the line
              doc.resizeImage (doc.height * 1.05), ResampleMethod.BICUBIC;
    should rather be
              doc.resizeImage (doc.width * 1.05, undefined, undefined, ResampleMethod.BICUBIC);
    or
              doc.resizeImage (undefined, doc.height * 1.05, undefined, ResampleMethod.BICUBIC);
    What is the Script supposed to achieve anyway?
    It’s not based on the obsolete concept of incremental resizing for better results, is it?

  • We have version 10.5.8 photoshop CS3 for Mac. How do we fix a problem with photoshop not resizing dpi? For example we resized a 72 dpi image to 200 dpi, when we do a pdf analysis it read as 344 dpi.

    We have version 10.5.8 photoshop CS3 for Mac. How do we fix a problem with photoshop not resizing dpi? For example we resized a 72 dpi image to 200 dpi, when we do a pdf analysis it read as 344 dpi.

    Sounds like it's a problem with the Acrobat settings. Did you set them to the same resolution?

  • Deactivating Photoshop with a script?

    Is there a way to deactivate photoshop using a script?
    Basically to automate the process?
    Thanks,
    Dan

    It looks as if this will not work with CS6 but might with CS5.
    If that didn't work you could try this...
    deactivate();
    function deactivate() {
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID('Mn  '), charIDToTypeID('MnIt'), stringIDToTypeID('deactivate') );
    desc.putReference( charIDToTypeID('null'), ref );
    executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
    If this doesn't work, I don't think you will be able to automate it.

  • Can Photoshop Batch Resize Tiff Files?

    I have quite a number of tiff files that I want to resize in terms of page dimensions and retain the same resolution / dpi. Can Photoshop batch resize tiff files?

    Yes Photoshop ships with a plugin Fit image you can record an action to re-size an image to fit within some number of pixels.  Image resolution setting and aspect ratio are not changed however the number on pixels the image will have will be less then or equal to the pixels size set.    For example if you set width and height to 2000px the largest size image you could have after the operation would be 1:1 aspect ratio square 4MP 2000x2000.  If your image has a landscape aspect ratio the re-sized image will be 2000px wide by less then 2000px high and if Portrait the re-sized is will be 2000px high be less then 2000px wide.  Bicubic Interpolation for the re-size.
    Once you record the single step action.  You can batch the action.  You can have batch open the image files and save over the original files or have batch save the resized files in a different location. Fit Image and Batch are both found in menu File>Automate>

  • I can't get Photoshop CS6 startup script to works ?

    Hi!
    I'm trying to get a script to execute each time photoshop cs6 is started. I've tried to put it in that folder ( Photoshop-CS6-Scripting-Guide.pdf page 10) C:\Program Files\Common Files\Adobe\Startup Scripts CS6\Adobe Photoshop but it doesn't start ... If I put it in there C:\Users\[USERNAME]\AppData\Roaming\Adobe\Bridge CS6\Startup Scripts it loads when I start BridgeCS6 but it fails as it's a script done for photoshop. So I try to put it in C:\Users\[USERNAME]\AppData\Roaming\Adobe\Photoshop CS6\Startup Scripts but didn't work as I was expecting ;o) .
    I don' think it matters but my OS is in french but photoshop is in english.
    So where is the proper place ?
    cheers

    Yes Startup Scripts is a Bridge thing.  If you open Bridge and use menu Edit>Preferences you will see Startup Scripts in the left pane if highlight that the right pane will contain a check box list of startup scripts you can enable.
    Photoshop has a script event manager. Script and action can be start automatically when an event occurs. They will not start if a a started event process has not finished nesting will not happen. So on an event like start application, new document, open document a script or action can be set to run.
    I never tried setting one up for start application but Photoshop ships with one named clean listener which could be useful. Find it in:
    presete\scripys\Event Scripts Only. And menu>File>Scripts>Scripts Event Manager

  • May I import a photo image from My Documents into Photoshop to resize?

    May I import a photo from My Documents into Photoshop to resize it?

    Hello Curt,
    I've not done this before...I saw your email by chance.  I clicked NO
    because I thought that there was no reply...that maybe it was not working.
    Please resend your answer.
    Thanks,
    Mark

  • Upload logo in script

    hi,
    I want to upload logo in script.
    I tried to import from t.code:se78 but it's showing the error
    'Graphic /BEV2/ED_SFRET_DEBI_P2_BMON already exists.Overwrite?'
    if i say Yes giving the error: 'File C:\Documents and Settings\anitha\SapWorkD has an invalid format'.
    and i unable to find ?
    Can u suggest me on this.
    Thank you,
    Anu.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Dec 23, 2008 11:41 AM

    Command in your Sapscript
    /: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E
    These are the steps to be followed for uploading graphics in R/3 system 
    1.   First save the file as BMP 
    2.   Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and 
          make it Zoom as 100% and save as *.TIFF 
    3.   Open SE38 and execute program RSTXLDMC
    4.   Give your TIFF file path name 
    5.   Select Bcol (for Color) 
    6.   TEXT ID will be ZHEX-MACRO-*. 
    7.   Inplace of * write your own logo name (ZCOMPANYLOGO) 
    8.   Execute the program 
    9.   Now Goto SE71 create your ZFORM 
    10. Create logo window 
    11. Goto text element of logo window 
    OR
    1.  Goto SE71 Change the mode to GRAPHICAL 
    2.  Choose the Graph Tabstrips
    3.  Now type in some name for the LOGO WINDOW 
    4.  Press the IMPORT BUTTON (third button from left) and then IMPORT the BMP file from your DESKTOP 
    5.  The code will be written automatically. You just need to drag and drop wherever you want
         the graphics to be. 
    /:   INCLUDE Z_COMPANY_LOGO OBJECT GRAPHICS ID BMON LANGUAGE EN

  • Resizing Script Exports in Low Quality

    Hello. A while back I found an image resizing script on these forums. Recently it's JPEG outputs have seemed to be on low quality, like 30%. How can I change this script-application to export resized images in a higher quality?
    Thanks, and the script is below.
    on open some_items
    repeat with this_item in some_items
    try
    rescaleand_save(thisitem)
    end try
    end repeat
    end open
    to rescaleand_save(thisitem)
    tell application "Image Events"
    launch
    set the target_height to 256
    -- open the image file
    set this_image to open this_item
    set typ to this_image's file type
    copy dimensions of this_image to {current_width, current_height}
    if current_height is greater than current_width then
    scale this_image to size target_height
    else
    -- figure out new height
    -- y2 = (y1 * x2) / x1
    set the new_width to (current_width * target_height) / current_height
    scale this_image to size new_width
    end if
    tell application "Finder" to set new_item to ¬
    (container of this_item as string) & "256_" & (name of this_item)
    save this_image in new_item as typ
    end tell
    end rescaleandsave

    You can't control the jpeg compression quality using Image Events. You can with iMagine Photo. iMagine Photo is free, and is like a more powerful version of Image Events.
    You can read about iMagine Photo here:
    http://www.yvs.eu.com/imagine.html
    You can download iMagine Photo from here:
    http://www.yvs.eu.com/downloading.html
    iMagin Photo documentation is here:
    http://www.yvs.eu.com/documentation.html
    Follows is a script that will allow you to specify the compression quality while scaling. The quality difference between maximum and lossless is tiny while the file size difference is quite large so I don't normally recommend lossless.
    The script does not copy the exif information to the scaled image file, but iMagine Photo can copy the exif information, and or modify certain exif types.
    The script replaces the contents of the original file - so beware.
    Kevin
    ---- begin script
    property theScale : 0.5 -- 50% scaling
    using terms from application "iMagine Photo"
    property exportQuality : high -- minimum / low / medium / high / maximum / lossless
    end using terms from
    on run
    -- this script replaces the contents of the original file
    set thisFile to choose file with prompt "Choose an image file to scale: "
    tell application "iMagine Photo"
    set thisImporter to import graphic thisFile
    if the component error of thisImporter is not equal to 0 then
    close thisImporter
    return
    end if
    tell thisImporter to make exporter with properties {export file type:"JPEG", export file location:thisFile, export compression quality:exportQuality}
    set scale of thisImporter to {theScale, theScale}
    export thisImporter
    close thisImporter
    end tell
    end run
    ---- end script

  • I am having issues with my logo resizing Illustrator or Photoshop?

    I have a website and I am wondering with Adobe Creative Cloud do you reccommend I pay for illustrator or photoshop.  It seems that when my friend resizes with photoshop to a larger size it pixelates.  Is illustrator better for logos in general or does adobe have a product reccommended instead of illustrator?  Thanks for your help I am pretty new to Adobe but their products are awesome. 

    The important thing is that logos should be vector based to allow unlimited scaling, not raster (pixel) based. The primary vector editing app is Illustrator. Photoshop is a raster image editor. It has some vector capabilities, but very limited compared to Illustrator.
    If the logo already is a raster image file, there isn't much you can do except recreate it in Illustrator.

  • Importing Microsoft WordArt logo into Photoshop and resizing results

    Hi there
    I am doing an evaluation of Photoshop to see if I can make small logos with it - suitable for business cards and also for larger displays.
    Recently I made up a name in WordArt which I'd like to use as a company title and maybe a logo on a business card. I'd like to import it into Photoshop and manipulate the size of the WordArt image so that it can be placed in advertisements, business cards and so on.
    I realise that Photoshop may be a more sophisticated product than what I really need but I would like to persevere and get something finished.
    Can anyone suggest which is the best tutorial video for this work or perhaps give me a few pointers so that I can get started?
    The image is made up of two elements: a WordArt title set at a 30° angle and underneath it is a separately drawn arrow which is used as an underlining for the title.
    Donlf

    Here's the process I just used to import Word Art created in Microsoft Word for Mac 2011 into Photoshop CS6. Let's see if it works on Windows, too!
    1. Open the Word document that contains your Word Art.
    2. Click on the word "File" in the top menu and mouse down to "Save As" (File > Save As).
    3.  In the new dialog box that then appears, choose PDF as the file type.
    The Windows Save As dialog box may not look exactly like this Mac dialog box.
    4. Open Photoshop, go to the word "File" and mouse down to "Open" (File > Open), then select the PDF you just saved.
    5. In the Import PDF dialog box that appears, click the "OK" button.
    Now you should have a high-resolution file that you can save as the PSD format.
    The next step is to read our FAQ on resizing Photoshop files for different uses: http://forums.adobe.com/message/4696567#4696567
    Let me know if these steps work. If they don't we'll figure it out together!

  • Problem with photoshop automatically resizing placed images

    Hi,
    I have PS6. I have images that are 144x100 px. When I use file>place ps resizes the image to 108x75. I can't figure out how to make ps quit resizing my pictures. Anybody know?
    Thanks

    When Pasting, Dragging, copying and placing an image Photoshop will copy all of the image being duplicated original pixels to preserve the image pixel quality the image quality.  If the receiving document has a different DPI resolution the image may look a different size in the  receiving documents because of the number of pixels added to the document that has a lower or higher dpi resolution.  If the image is being placed in if the image pixels exceeds the receiving documents canvas size. Photoshop may scale the smart object layer to fit within the canvas that depends on the users Photoshop's preference.  All of the images original pixels are still there in the embedded object.   In my Photoshop Collage Scripts  I always transform all placed images to 100% size  incase Photoshop scaled the placed image.  For you can not get the scale percent Photoshop used.  Once I know I have the image at 100% size I can use the layer bounds to get the actual number of pixels there are in the placed image.  Once I know that I can calculate the scale I need to use to resize the image to fit the area being populated in the collage template.   Once resized I center it into place and mask off any excess image pixels.

  • CC 14.2.1: MiniBridge Photoshop Tools menu scripts are launching CC 2014.. err why ?

    I've installed CC 2014 and Adobe Bridge update 6.1.0.115. Since installing, if I use Photoshop CC 14.2.1 and try and access the Photoshop Scripts in Mini Bridge (Load Files as Layer, Batch, Image processor etc) they launch CC 2014 instead. I've tried changing back the File Type Associations in Bridge CC and resetting the Bridge Preferences also, but no change. I had this happening simultaneously in a Photoshop course I was teaching with 6 macs running 10.9.3 today. I'm thinking this is probably due to the Bridge Update calling the scripts from the CC 2014 application folder instead of CC.
    The obvious answer seems to be to ditch CC and go 2014, but for a variety of reasons I want a fully working version of CC for the next few weeks or months, and the functionality of Bridge for CC 2013 seems lost at the moment.
    Can anyone else confirm this or have solution ?

    You must be on a Mac.  On windows only one version of Photoshop can at any given time.  Normally when try to launch a second different version of Photoshop your thrown into the version of Photoshop the is currently running.  However if its the Bridge the tries to do the because Bridge CC has been updated to use Photoshop CC 2014.  Nothing Happens its as though you did nothing.  I would bet Bridge tried to launch Photoshop CC 2014 for it does when Photoshop is not running.  But If it tries to launch Photoshop CC 2014 it would not launch gor Photoshop CC 14.2.1 is up and running. Its an Adobe Bug the do not have a Bridge CC and a Bridge CC 2014.    When  Photosgop CC 14.2.1 mini bridge extension launch Bridhe it launches the update Bridge CC which turned it into  Bridge CC 2014 though the Creative Cloud labels it Bridge CC.

  • Photoshop cs4 file/scripts/image processing settings

    I have recently started freelancing for a local newspaper, as you can imagine i could have up to 100 images to process at the end of the day.
    I started using file/scripts/image processing in photoshop cs4 to automaticly size my images. this is indeed fantastic instead of half an hour or sometime an hour it only takes 5 minutes...But... most newspaper print at 150dpi and the image processor does it automaticly at 72dpi, i need to change this setting to 150dpi in file/scripts/image processing (not to get mixed up with image/image size please).
    Can you help me please.
    Joey

    I think you got the answer elsewhere.
    Make an action to set the size and resolution and run that in the Image Processor or as a batch.

  • Photoshop CS6 Startup Script Missing from Bridge CC

    Hi. After downloading a Photoshop CS6 update, Camera Raw unlinked from Bridge CS6. I have a full CC subscription so I downloaded Bridge CC and that solved the problem. Now Photoshop does not appear in the 'tools' menu. It is missing from the Startup Script list in preferences as well. Where can I find or download the photoshop script?
    On a mac, using Mavericks.
    Thank you!

    Bump. Any solutions yet?
    restart Bridge holding down option (Mac) or ctrl (Win) key ad from the menu choose reset references. Try again. BTW, the start up scripts from the needed applications for Bridge Tool menu are in Bridge preferences / Start up scripts, they should show and have a checkmark in front of them.

Maybe you are looking for

  • Query about scsi-attach

    Hi, I am trying to make scsi devices from OVM 3.0 server visible to RHEL guest "as SCSI". I executed 'xm scsi-attach' command to bind scsi device to a domain xm scsi-attach 0004fb0000060000e36116a4c0038eab /dev/sdl 4:0:1:0 However, after executing th

  • Is Discoverer 4.1 section 508 compliant

    I would like to get any documentation if any that states that Discoverer 4.1 or the Oracle Discoverer 9iAS version is section 508 compliant. Section 508 requirements describe the design features and constraints needed to support persons with disabili

  • Assets = liability + owners equity

    Hello GL gurus, Can you help me to find the following entry's fall into to which category? Dr. Receivable (Is it asset or liability or owners equity?) Cr. Unearned (Is it asset or liability or owners equity?) Cr. Revenue (Is it asset or liability or

  • Accessing Music without internet connection?

    Will I be able to access my music without internet connection if all my music on my iPhone is coming from iCloud?

  • HT2204 how to change country

    I am unable to change the country associated with my apple id. hence not able to buy items of another country...anyway out?