Can you specify the background color when resizing the canvas?

I haven't found this in the Scripting Reference.
In the "Canvas Size…" dialog box you can specify the "Canvas Extension Color" to "Foreground", Background", "White", "Black", "Grey" or "Other…".
Can this be scripted?
I am writing an AppleScript to resize my canvas in order to add a slug to the bottom of the image. Currently my script stores the background color, so I can change it to White to accomplish my goal without discarding the background color (which gets restores at the end of the script). The problem is that if the user has a custom color (i.e. Pantone color) as the background color, the color does not get stored.

See if this works for you… Just some very basic AppleScript with a call to 'do javascript' in this case the variable 'Solid_Fill' this is a cleaned up piece of scriptlistener output (done very nicely by X's tools you will see a post below to the latest release of this) The scriptlistener output has been turned into a function that javascript can call. Inside of the function call I have put a list arguments passed from AppleScript. So the values 0, 0, 0, 0 in the AppleScript list end up as arguments passed to the functions C, M, Y, K variables. AppleScript objects are 1 based Javascript are 0 based & values the same.
set Solid_Fill to "function solidFillCMYK(C, M, Y, K) {
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };
var desc8 = new ActionDescriptor();
var ref4 = new ActionReference();
ref4.putClass( sTID('contentLayer') );
desc8.putReference( cTID('null'), ref4 );
var desc9 = new ActionDescriptor();
var desc10 = new ActionDescriptor();
var desc11 = new ActionDescriptor();
desc11.putDouble( cTID('Cyn '), C );
desc11.putDouble( cTID('Mgnt'), M );
desc11.putDouble( cTID('Ylw '), Y );
desc11.putDouble( cTID('Blck'), K );
desc10.putObject( cTID('Clr '), cTID('CMYC'), desc11 );
desc9.putObject( cTID('Type'), sTID('solidColorLayer'), desc10 );
desc8.putObject( cTID('Usng'), sTID('contentLayer'), desc9 );
executeAction( cTID('Mk  '), desc8, DialogModes.NO );
}; solidFillCMYK(arguments[0], arguments[1], arguments[2], arguments[3]);"
tell application "Adobe Photoshop CS2"
activate
set User_Rulers to ruler units of settings
set ruler units of settings to pixel units
set Doc_Ref to the current document
tell Doc_Ref
set background layer of last layer to false
do javascript Solid_Fill with arguments {0, 0, 0, 0} show debugger on runtime error
move first layer to end
set Doc_Height to height
-- set Doc_Width to width did NOT need this
resize canvas height Doc_Height + 200 anchor position top center
flatten
end tell
set ruler units of settings to User_Rulers
end tell

Similar Messages

  • Can I change the background color when I'm in a brochure layout?

    can I change the background color when I'm in a brochure layout? I've tried making a box in desired color but cannot push it to the back(not an option, it's greyed out)

    Then you are in a Layout template and the shape is already the back most object.
    Peter

  • Is it possible to change the background color when publishing as EXE Full Screen?

    I often publish Captivate projects as EXE - FullScreen. I would l like to set the background color outside of the EXE frame. Is that possible. When running my Captivate published .EXEs at full screen at a resolution greater than the project, a tan color background color appears and I would like to change it to black, or some other color. I tried the Skin - HTML background color, but that had no effect.
    Thanks
    Jack
    Captivate 7 / Windows 7

    Hi,
    it is - use the oItem.BackColor property
    BackColor PropertyDescription
    Returns or sets a value specifying the background color of text or graphics in an item.
    Property type
    Read-write property
    Syntax (Visual Basic)
    Public Property BackColor() As Long
    Remarks
    RGB value in long representation. You can use the standard Visual Basic colors, for example, vbBlue, vbYellow, etc.
    The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF).
    lg David

  • How do you change the background color not of the video clip, but the background the clip is on?

    How do you change the background color upon which the clip resides...
    I don't want to change anything within the clip itself, but the matte(?)
    from black to white or cream.
    I am working with Elements 10...

    Create a color matte of the desired color and place it on video track 1.  Then place your video on track 2.
    from here: Adobe Premiere Elements Help | Creating specialty clips
    Create a colored matte for a background
    You can create a clip consisting of a full‑frame matte of solid color, which you can use as a solid background for titles or animated clips.
    Brightly colored mattes can serve as temporary backgrounds to help you see transparency more clearly while you adjust a key effect.
    Click Project Assets. 
    In the Project Assets panel, click New Item from the panel options and choose Color Matte. 
    Choose a color in the Adobe Color Picker dialog box, and click OK. 
    A color matte clip is placed into both the Project Assets panel and the Expert view timeline.

  • Changing the background color when opening an image?

    I just installed Firefox on my new Windows laptop, and when I open an image in a new tab the background around the image is a dark gray. On my old computer the background is white, which I much prefer. How do I change this setting?

    It is a new feature in Firefox 11+ versions to display a single image centered with an almost black background.
    It is added by this stylesheet:
    * resource://gre/res/TopLevelImageDocument.css
    You can look at this extension to set your preferred background color and remove the centering.
    * Old Default Image Style: https://addons.mozilla.org/firefox/addon/old-default-image-style/
    See also these forum threads for other solutions (e.g. userContent.css):
    *[[/questions/923127]]
    *[[/questions/923431]]

  • How to change the background color of  a Tab Canvas

    Hi All,
    I accidentally changed existing background color of a tab Canvas to ' gray' which is not matching with main canvas (which has default).
    How can I change background color to default. Please help me.
    -Thanks

    In the property palette of the tab page, click on the "Background Color" property and click the "Inherit" button on the top of the property palette, this will revert the value of the property to the default when the tab page was created which is <Unspecified>.
    But if your tab page has inherited the color from a property class it will revert to what was specified in the property class.
    Tony

  • How can you match an existing color when you are using the Hue/Saturation adjustment layer?

    Hi, I have a student who wants to match the color of a new layer to the exact color of an existing layer. He is using an adjustment layer to "eyeball" the color match, but is there a way to ensure that the match is perfect?

    Depends, John.
    If you're able to create a reasonable selection via Color Range, feathered masking, etc, then by matching one specific color, you'll also be correcting for that entire range of hue. It might have been needed anyway...or you use a color filter to correct the whole image, if it's needed.
    As we all know, each image presents its own specific challenges and solutions.

  • Can you share apps between accounts when using the same PC

    My wife and I have always shared my account. made it easy to purchase and share. Howeever, with iCloud etc its becoming increasingly obvious that seperate accounts might be needed.
    Can you share apps you purchase through differnt accounts when your using the same computer?
    I now you can with music.

    Yes.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    You can figure out using it with another machine from that too

  • Cuatom Forms: Loosing the Vertical scrollbar when resizing the Window

    Hi All
    I have developed a Custom Form. In that there is a Content Canvas and on the top of that I have put a Stacked Canvas so that i can get both the Horizontal and Vertical scrollbars. the form has more than 40 fields to display.
    Folder tool functionality has also been added to the Form.
    The form works absolutely fine and scrollbars too.
    But when I am resizing the window (making the window size bigger or smaller by dragging the window on the Oracle Apps screen), at that time I am loosing the vertical Scrollbar. Other than Vertical scrollbar everything works fine.
    Is there any way (any code) by which the Vertical Scrollbar will not disappear.
    I would really appreciate if any one could guide me on this.
    Thanks
    Madhu

    Madhu,
    Please post your message in the Oracle E-Biz forum. This forum is for Non-EBS Forms development and everyone here may not have EBS Forms development experience.
    That having been said, I encountered this about a year ago. If I remember correctly, we were able to resolve the issue by applying a Forms server patch to the Apps Tech stack. Please check Metalink to verify.
    Craig...

  • Background Color When Displaying Playlists

    After years of use, when opening iTunes today, the background color when displaying the playlist changed from white to pink. How do I change it back to white

    Make sure that in your Display Settings colour is set to 32 bit. See this link for details: iTunes - Pink iTunes window under iTunes XP/Vista

  • Can i change the background color to grey?

    I was wondering if it is possible to change the background color
    of JDeveloper to grey so that i can "relieve" my eyes.
    Thanks,
    Alex.
    null

    hi user505516
    You could try "Tools" > "Preferences..." > "Code Editor" > "Syntax Colors" and from the "Available Styles" list select "Default plain text" and from the "Background Color" dropbox select the color you prefer.
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • When converting word doc to pdf, my images with text only show the background color of the text box.

    I have a word doc that I am trying to conver to pdf.  I have jpegs with text boxes on top of them on one page.  It looks great on the screen but after I convert to pdf, the text boxes only have half the text, the first half of the text box is just white - the background color.  If I take the background color out of the text box, the text converts over fine but I need the background color.
    I have tried many things here on the print settings, standard, high quality print, unchecking the compression on the images.  Any help?

    Thank you for your posting. These forums are specific to the
    Acrobat.com website and it's set of hosted services, and do not
    cover the Acrobat family of desktop products. Please visit the
    following forums for any questions related to the Acrobat family of
    desktop products:
    http://www.adobeforums.com/cgi-bin/webx/.3bbeda8b/

  • Swatches loading into background color when clicked, not foreground

    Can someone advise. When I mouse click on a swatch from the brush tool the color I select is loaded into the background color instead of the foreground color. Then to use the color I have to slide the reverse tool, which is a pain and slow. How can I have the clicked color load into the foreground first? I'm in Mac CC.
    Thanks,
    Seth

    It can be hard to tell which color chip in the color panel is actually the active one.
    The active color chip in the color panel will have either a white or grey line around it, depending on the ui interface color photoshop is using)
    When you use the eyedropper are you using any modifier key like Command.
    You shouldn't need to use any modifier key with the Brush Tool selected and clicking on one of the swatches in the Swatches panel to set the foreground color.
    (with the brush tool selected, holding down the command key while clicking on one of the swatches will set the background color in the toolbox)
    If nothing seems to work, i would reset the photoshop preferences
    Press and hold the Shift+Command+Option keys just after starting the launch of photoshop
    Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop settings file
    Press Yes

  • How do you change a background color in Lightroom 4.4 ?

    Hi ..please how can you make a background color change in Lightroom 4.4  ?@

    If you are talking about the surrounding background of the photo while in Library Loupe View or in Develop, that you can select among 3 levels of gray, black or white in the Preferences / Interface settings.
    If you are talking about the photo itself, you need to be a bit more specific about what you'd like to do.

  • Why does the eyedropper tool set the background color swatch instead of the foreground?

    Whenever I try to use the eyedropper tool in Photoshop CS5, the eyedroper sets the background color instead of the foreground. I know you can swap the colors with the arrows, but Photoshop used to be able to just put the color in the foreground swatch without me doing any extra manual work. How do I restore it?

    Click on Windows and color.  There is a setting there to change from
    foreground to background.  The one with the box around it is the default setting.

Maybe you are looking for