Creating a uniform border as a percentage of image size. How?

I am wanting to build a script that will allow me to add a black border measuring a uniform width (say 5% of the picture height) for a batch of images of different resolutions and sizes. Problem is, increasing the canvas size by +5% black on a rectangular photo will not produce a border of uniform width. It would also be great if I could add text + logo (saved as an eps) to the border - something like the picture below. Can this be done as an automated script?

BINGO! It works.
Looking at your script, this is the line that makes all the difference ...
var fivePercent = (Math.min(doc.height,doc.width)/100) * 5;
When the pics are scaled to the same size in Photoshop, borders and text size are identical. Perfect!
Paul and Michael, you guys have inspired me to read up on Javascript.
Again, many thanks.

Similar Messages

  • Transparent border appears when I use Image Size to shrink an image (bug)

    In CS2 (9.0.2) and CS3 (10.0.1), whenever I shrink an image using Image Size, my layers get a slightly transparent edge. As a game developer, I make tiling textures a lot, and this generally ruins their tiling-ness.
    Try this:
    - create a 32x32 image, make it white
    - add a layer, fill it with black
    - shrink it to 16x16 or 20x20, using any of the Bicubic resampling methods
    - notice that the edge pixels of the black layer are slightly transparent. This is most noticeable in the corners of the image.
    Is there a better place for me to report this bug? I haven't found one.

    Haha, you mean it's a bug in the spec rather than a bug in the implementation? (Unless there is actually a reason someone would want it to work that way.)
    Yeah Bilinear and Nearest Neighbor both avoid the problem, but of course the image doesn't look as good.
    I work around it by duplicating all my layers before shrinking. The problem is obvious (in-game) with only one layer, but still subtle enough that it's usually invisible after duplicating. Annoying, but it works.

  • I was wondering how I could use Photoshop to create a custom border

    I was wondering how I could use Photoshop to create a custom border around the featured slider image on my homepage.
    I am using a Wordpress theme called Gazetti if that helps. Thanks in advance for any help given.

    the simple answe is no, the macbook pro screen cannot be used as a second display for other devices

  • How can I create a white border around figures that are in an image? (CS 6; examples+image included)

    Hi,
    I have CS6 and am wondering how to create a white ("comic style"?) border around figures in an image, as in the examples below. I don't wish to include the black shadow of the border, just the white part.
    Examples:
    Here's the image I'd like to alter, making a white border around the outline of all five figures:
    I researched for quite a while but could find no instructions. It would be very much appreciated if someone knows and would be kind enough to share the technique! Thank you.

    If you make the image a layer (opposed to Background)...
    You could Select the blue with the Magic Wand as Semaphoric says, then fill with white.  Then choose Select - Modify Selection - Contract, and mask or delete the remaining pixels.  The Contract operation will give you a nice border the size you choose.
    For extra credit, you could use Refine Edge to make the selection more accurate.
    Click to see the image  against a dark background.
    -Noel

  • Can I create a page border using Adobe Acrobat Pro 9?

    I'm making a certificate of completion and would like to create a page border.  Is there any way to do this is Adobe Acrobat Pro 9?

    If what you want to do is scale a page down to a smaller size, Acrobat doesn't do that, not directly anyway. I think there are plugins for Acrobat that can do this.
    if you're desperate and/or don't want to go to that expense, there is a hack available in Acrobat that can get you there. If you've added other interactive elements (links, bookmarks, etc.), you'd have to recreate them. Post again, preferably in a new topic (since it doesn't apply to this one), for more info.

  • Create an inset border Cs6 Photoshop

    Hi All,
    I cannot seem to figure out the steps to create an inset border, I used Windows edit for the example of what I desire.
    I would like to shown the steps to do this in Photoshop CS6 Please.
    Before:
    What I want... I used Edit in windows Paint to achieve this but one would think this should be as easy as Stroke and inset.. But I could not get it to work?

    In Photoshop, you would start with the Marquee Tool.
    I would move the Marquee cursor to where I want the border centered, and holding down the Option/Alt key, drag out.
    When you have the Marquee where you want it, use Edit > Stroke, where you can set the color and width of the stroke, and where around the marquee you want the stroke to go.
    As in your illustration, guides are best for placing your border. Having it on a separate layer gives you more flexibility.

  • Creating a uniform gradient inside a rounded rectangle

    Hi
    I am trying to create a uniform gradient in a rounded rectange. I have tried a gradient mesh, but the 2 sides are too dark and I have also tried a normal gradient, but that does not create a dark shadow on the 2 sides as per the picture attached. How can I create a smooth uniform gradient along all sides please?

    And to that end this is done with two inner glows applied to one objet with two fills then made into a graphic style then changing the color using different blending modes offer other options as well.
    Takes experimentation

  • Creating a stamp border for logo

    Hi all,
    I would like to create the wavy border as shown on the cup:
    http://payload.cargocollective.com/1/1/40912/894199/vasoybolsa0_750.jpg
    Be great if someone can direct me to a tutorial.
    Thank you

    That was probably done in a vector drawing program like Adobe Illustrator.
    You can probably get something close to that in Photoshop using the Polygon Shape Tool. Set its side for how ever many bumps your want (say 32?).
    Set it to Star, Smooth Corners, Smooth indents with 10% or so indent sides?

  • I have an app open on my ipad but the app window has zoomed out creating a black border around the window. i cannot do anything on my ipad but it hasnt froze, my music is playing and i can only zoom in and out. i wont even let me turn it off can you help?

    i have an app open on my ipad but the app window has zoomed out creating a black border around the window. i cannot do anything on my ipad but it hasnt froze, my music is playing and i can only zoom in and out. i wont even let me turn it off can you help?

    You should also ask this in the iPad forum. This is the forum for the white and black plastic MacBooks that were discontinued in 2010. You should also post this question there to increase your chances of getting an answer.
    https://discussions.apple.com/community/ipad/using_ipad

  • Creating a square border in LR5

    Is it possible to create a square border in LR5? If so, how? So far I have only been able to create a white border with rounded corners.

    Hi keith9119,
    In the Library module, select the photo you want to have a border, then switch to the Print module.
    In the Template Browser on the left side of the application, select a Single Image template the correlates to the size you want the photo to be, such as 4 x 6 or 8 x 10.
    In the Image Settings panel on the right side of the application, select Stroke Border. Specify a Width of the desired size (such as 10 points) and click the color swatch to choose a color, such as white.
    In the Print Job panel, choose Print To > JPEG File. Specify the resolution and other options (sharpening, JPEG quality, etc.).
    Click Print to File.
    Try the given steps and let know if that helps!
    Sarika (T2)

  • CP5.5: Creating a custom border

    Hi, everyone,
    Is there a way to create a custom border to appear beneath the playbar? I'd like to show an agency seal and classification markings. I assume there is more to this process than just creating the border and dropping it in the directory where Cp5.5 keeps the borders.
    Thanks!

    Your best bet is NOT to muck around with your publish templates first.  Try edting an already published HTM file to achieve the result that you want, and then ONLY once you know you have a solution, edit your publish templates.
    They're located at: C:\Program Files (x86)\Adobe\Adobe Captivate 5\Templates\Publish
    In order to pull this off you (or someone else you know) will need to have knowledge of how to program HTML and CSS.

  • Which component creates a titled border

    Which component can I use to create a titled border around a group of radio buttons. I can't seem to find which component it is.
    Thanks

    How to Use Borders
    http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html
    Create a panel, set the border and add your radio buttons to the panel.

  • Creating a new document/canvas (to add multiple images to)

    I am totally new to Photoshop Elements (using v.13), with some previous experience in old versions of Photoshop. I am an interior designer and I want to make a design board. Essentially what I am trying to do is create a new, blank document layer and then add images of furniture, rugs, etc. Each element needs to be its own layer so that I can edit each individually. I have no idea how to even begin that on here. New document? Open a blank document? When I go to the layers tab, creating layers is not even an option. Obviously, I need some help. Explain this to me as you would to a child....Thanks!

    jennb21985 wrote:
    Each element needs to be its own layer so that I can edit each individually.
    Open the Editor in Expert tab
    Go to File menu>new>blank file. Enter the dimensions, resolution in px/in, and background. This  "canvas" will be the background layer and will show up as such in the layers palette.
    Now, as far as adding pictures of furniture, rugs, etc., I suggest that you prepare each one so that they are ready to be placed on the canvas. Do the math: how large can each one be? Are they all in portrait or landscape orientation? If not, what will be the best fit? Is the brightness/contrast of each picture more-or-less uniform so that the design board will look nice.
    Crop each picture to specification, and save it to disk.
    Once you have done this, do the following:
    Open the blank file
    Open Picture A, go to Select menu>all, then Edit menu>Copy to place it on the clipboard,
    Go back the blank file, then Edit>Paste. Picture A will be on its own layer. Position it with the move tool, and resize with the corner handles, if needed.
    Do the same with pictures B, C, D, etc.
    As indicated above, in the dialog for the blank file, you need to enter a value for resolution. Ideally, the resolution should be the same as that of the picture files. You can check via Image menu>resize>image size. If the resolution is 72 px/in, enter this in the field for the blank file.
    Feel free to repost if this is not clear.

  • Can you lock aspect ratio, define border and image size with automated BatchCropStraighten?

    Hello everybody,
    I need to crop and straighten a load of scanned rectangular stamps that will start as a single scanned image, and I want to lock the aspect ratio to 1:1, define the top border size (such that the the borders on the sides will be bigger than those top and bottom) and specify the output image size.
    Does anybody know if this is possible using the automates BatchCropStraighten function?
    Thanks,
    Paul

    paulsinyard wrote:
    Does anybody know if this is possible using the automates BatchCropStraighten function?
    I know of no BatchCropStraighten feature in Photoshop.  Photoshop has a Plugin CropPhotosAuto that you access through menu File>Automate>Crop and Straighten Photos.
    On my windows system its "C:\Program Files\Adobe\Adobe Photoshop CC 2014\Required\Plug-Ins\Automate\CropPhotosAuto.8li". This plug-in is designed to help you scan several image with a single scan. All the plug-in does is to look at the current active document looking for what appears to be a scanned image and to create an additional document that contain a straighten version of the image the size of the image. No files are created nothing is saved only one document is processed even if you had several scans open in Photoshop.  When the Plug-in ends the current active document is the last document the plugin created.
    You may be able to program a Photoshop script that would fit the create documents to some size then add canvas that would make all the documents have the same Aspect ratio and size. The borders added would be equally sizes on opposite sides top and bottom the same left and right the same.  However the image aspect ration inside the borders may vary.
    I created a fake scan with five simulated images. Not straight and not all rectangles  and duped the document so two would be open the used File>Automate>Crop and Straighten Photos when the process finished I spread out the document so you could see all that are open in this screen capture.

  • I created a signature ID and customized the signature; however, when I go to sign it only shows the name layout or graphic image? How do I go back to using the certificate?

    Dear Forum
    I was using Adobe version XI and the signature feature disappeared from the menu. Now I downloaded Acrobat Reader DC. Using the menu and instructions I created a signature ID and customized the signature; however, when I go to sign a document it only shows the name layout or graphic image? How do I go back to using the certificate that I created?
    Any help would be greatly appreciated.
    Regards
    Carlos

    Firefox works fine on Windows 2000 SP4 for me.
    Any chance you have a dial-up connection that uses a web accelerator to speed the loading of content?

Maybe you are looking for

  • GPS not showing up in LR 4.5

    I am shooting with a Nikon D4 with the Nikon GPS attachment. Even though the camera indicated the GPS info was captured and the files, when viewed in PS, shows the GPS info was captured, the only GPS info that shows in LR is the altitude. These are R

  • Shared Components Privileges works strange

    Hi all, I try to give some group rights to create his own templates javascripts, images etc.) Behavior of this right is quite strange: User could create template and after he saved it once, he could only open it. Why he hasn't possibility to change i

  • "recently added" playlist does not sync correctly

    Hi, i have an iPhone 5, ios6 and iTunes 10.7 (all German). In iTunes i have the smart playlist "recently added". It is sorted by the "last added" field. The playlist is setup as: added within last 2 month, mediatype is music, only marked objects, aut

  • Since installing Google Earth, I cannot upload any photos to any websites. How do I fix this?

    I installed Google Earth and now I am unable to upload any photos to any websites (i.e. Facebook, Ebay, etc.). I updated all plugins according to your support page and still cannot upload any photos. Please help with this matter. Thank you for your t

  • I can not use jdk1.5 in JBuilder

    I am using JBuilder X,when i change my jdk to 1.5,it shows below: "MainPanel.java": cannot access javax.swing.JPanel,bad class file: C:\tools\j2sdk1.5.0b1\jre\lib\rt.jar\javax\swing\JPanel.class,class file has wrong version 49.0, should be 48.0,Pleas