Auto copy one pixel row from image....

Can someone help me write a script that:
- from my selection (1 pixel row)
- auto copy selected area to next row into new layer (up or down)... and so on (into the same second layer)... until it reaches the end of the image
- the result is a photos with two layers; in the first is my image and in second is multicolored pattern

I don’t see a problem; naturally the Selection should be a vertical column.
One should include a check for this condition, I guess.
// 2012, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var originalRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
myDocument = app.activeDocument;
// new layer;
var id14 = charIDToTypeID( "CpTL" );
executeAction( id14, undefined, DialogModes.NO );
var theLayer = myDocument.activeLayer;
var theHeight = theLayer.bounds[3]-theLayer.bounds[1];
var theCheck = false;
var theCounter = 1;
// duplicate, move and merge the layer;
while (theCheck == false) {
if (theLayer.bounds[0] > 0) {
var theCopy = theLayer.duplicate();
theCopy.translate(theLayer.bounds[0] - theLayer.bounds[2], 0);
theCounter++;
var theLayer = theCopy.merge();
//$.writeln(theCounter);
else {theCheck = true};
// reset;
app.preferences.rulerUnits = originalRulerUnits;

Similar Messages

  • One pixel around borderless image in table

    Hey,
    I have an image in a table. I set the background color of the
    table to a greyish blue, because the table is taller than the image
    and i want there to be color below the image in the table. BUT ONLY
    in the table. The width of the table is the same as the image. For
    some reason, there is one pixel of the background color of the
    table around the jpg, and I cant get it to go away. I tried
    cellpadding="0", but that didn't do anything. I also tried negative
    numbers, but taht didnt do anything either. Am I SOL or can I put
    this image in the table without having the background exceed the
    image?
    Simple:
    <table width="600" border="0" align="center">
    <tr>
    <td width="216"
    background="../../Images/tablebgcolor.jpg"><p><img
    src="../../Images/Old Main.jpg" alt="" width="216"
    height="332"/></p>
    </td>
    <td width="374"> </td>
    </tr>
    </table>
    Note that I used the image of the background color instead of
    setting the background color itself. In either case it's the same,
    and I can't get a different result. Thanks for the help,
    --G

    What happens if you remove the <p> tag around the
    image?
    <p> tags have a default padding, so unless you zero
    that out or move the
    image of of the <p> you'll get some spacing around it.
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au
    Spry Widget Examples
    http://www.dreamweaverresources.com/spry-widgets/
    ~ Forum Posting Guidelines ~
    http://www.adobe.com/support/forums/guidelines.html
    CSS Tutorials for Dreamweaver:
    http://www.adobe.com/devnet/dreamweaver/css.html
    "117236" <[email protected]> wrote in
    message
    news:gbkakt$8me$[email protected]..
    > Hey,
    > I have an image in a table. I set the background color
    of the table to a
    > greyish blue, because the table is taller than the image
    and i want there
    > to be
    > color below the image in the table. BUT ONLY in the
    table. The width of
    > the
    > table is the same as the image. For some reason, there
    is one pixel of
    > the
    > background color of the table around the jpg, and I cant
    get it to go
    > away. I
    > tried cellpadding="0", but that didn't do anything. I
    also tried negative
    > numbers, but taht didnt do anything either. Am I SOL or
    can I put this
    > image
    > in the table without having the background exceed the
    image?
    >
    > Simple:
    >
    > <table width="600" border="0" align="center">
    > <tr>
    > <td width="216"
    background="../../Images/tablebgcolor.jpg"><p><img
    > src="../../Images/Old Main.jpg" alt="" width="216"
    height="332"/></p>
    > </td>
    > <td width="374"> </td>
    > </tr>
    > </table>
    >
    > Note that I used the image of the background color
    instead of setting the
    > background color itself. In either case it's the same,
    and I can't get a
    > different result. Thanks for the help,
    > --G
    >

  • Feature Suggestion: Auto Copy Libraries into Project from GUI

    I'm surely not the only one to think of this but I know I would find it very useful. When going to the Libraries section in the project settings under the desired configuration, we choose from all the libraries Jdev knows about. Of course when we shuttle them over to be in the project classpath, the jar files stay where they are. Could there be an option during this operation to add them to the project? What I mean by that is to copy the jar files from their referenced location into a directory underneath the project root and then add the files into the jpr. This would be similar to what the Struts wizard asks when it says, "Would you like to copy the struts libraries into the project?". If you say yes, it does just what I described.
    I find myself more often than not wanting to control the environment on a project by project basis - regardless of what libraries are local to the workstation. This type of library management is especially useful in a team setting. When the environment JARs are tied to the project, we can put the whole thing under source control and never have to worry about not having the right libraries on our local machines. They always get downloaded with the project. Not to mention how much easier it is to upgrade Jdev without wondering where that library went that I knew worked with my project before but now is a new version bundled with the IDE.

    Welcome to the discussions,
    you can address Apple directly and leave your suggestions by using the feedback page: http://www.apple.com/support/feedback/

  • Exp/imp one single row from/in a table

    Hello,
    I wanna export just one row from a table of one user and import it to the same table on another user. Users are both similar (one is in production other is for testing purposes).
    I'm using this for exp:
    exp userA/A@A file=row.dmp tables=tableA query=\"where code=\'blah\'\" rows=yes
    But I'm getting 911 error:invalid character.
    Any idea what's wrong with that?
    Also, any idea how the imp will look like?
    Thanks in advance
    PS: Oracle version is 9.2.0.6.0 and os is win xp.
    Problem that I can't use insert select is that users are identical but on different servers (the server where the imp will be is actually in another country :) so I need to send the dmp file. The imp question is only for my personal knowledge update :)
    Message was edited by:
    Samfuerte
    Message was edited by:
    Samfuerte

    Hello,
    I wanna export just one row from a table of one user
    and import it to the same table on another user.
    Users are both similar (one is in production other is
    for testing purposes).
    I'm using this for exp:
    exp userA/A@A file=row.dmp tables=tableA
    query=\"where code=\'blah\'\" rows=yes
    But I'm getting 911 error:invalid character.
    Any idea what's wrong with that?
    Also, any idea how the imp will look like?
    Thanks in advance
    PS: Oracle version is 9.2.0.6.0 and os is win xp.
    Message was edited by:
    SamfuerteHi.
    Try this query..it worked for me.....
    "exp userA/A@A file=row.dmp tables=tableA
    query=' where code=to_char(blah)' rows=yes"
    thanks ,
    Navneet
    Message was edited by:
    user644725
    Message was edited by:
    user644725
    Message was edited by:
    user644725

  • ADF: How to get the attributes' values of one single row from a table?

    Currently I have a table with 3 attributes, suppose A,B and C respectively. And I've added an selectionListener to this table. That means when I select one single row of this table, I wish to get the respective value of A, B and C for that particular row. How do I achieve this?
    suppose the method is like:
    public void selectionRow(SelectionEvent se) {            //se is the mouse selection event
    .......??? //what should I do to get the values of A\B\C for one single row?
    Edited by: user12635428 on Mar 23, 2010 1:40 AM

    Hi
    Assuming you are using Jdev 11g.
    Try with this
    public void selectionRow(SelectionEvent se) {
    String val = getManagedBeanValue("bindings.AttributeName.inputValue");
    public static Object getManagedBeanValue(String beanName) {
    StringBuffer buff = new StringBuffer("#{");
    buff.append(beanName);
    buff.append("}");
    return resolveExpression(buff.toString());
    public static Object resolveExpression(String expression) {
    FacesContext facesContext = getFacesContext();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    ValueExpression valueExp =
    elFactory.createValueExpression(elContext, expression,
    Object.class);
    return valueExp.getValue(elContext);
    Vikram

  • Reading pixel color from Image?

    Hello frnds,
    I am making a project in which i have to upload Image, am trying to find color of each pixel in RGB format so that I can locate where my sprite begins in Image !!
    But I am not able to do so.. do I have to use PixelGrabber to do that? or should i use RGBImageFilter..!! I am new to java so if u can tell me how to use them, then It would be grateful.
    I want to scan whole image from left to right, Right to left, top to bottom and vice-versa. So that I can exactly tell at what pixel value sprite starts and ends.
    Please help me out. any sort of help will be useful for my project..
    Thanking you in advance.

    Image bufferImage;PixelGrabber pg1;
    public boolean fetchPixels(byte[] jpegData, int[] pixelData)
         try
              bufferImage = Toolkit.getDefaultToolkit().createImage(jpegData);
              // this may not be required unless asynchronous, but seems to do no harm
              MediaTracker mt = new MediaTracker(jcamData);
              mt.addImage(bufferImage, 0);
              try
                   mt.waitForID(0);
              catch(InterruptedException e)
                   e.printStackTrace();
              if(mt.isErrorAny()==true)
                   System.out.println("Exception fetchPixels "+"createImage failed");
                   // flush anything in bufferedImage
                   if(bufferImage!=null)bufferImage.flush();
                   return false;     // and pixelData not updated
              Thread.yield();
              pg1 = new PixelGrabber(bufferImage, 0, 0, camWidth, camHeight, pixelData, 0, camWidth);
              try{pg1.grabPixels();}catch(InterruptedException e){}
              Thread.yield();
              // flush bufferedImage as no longer needed, and so not to be in memory cache for next image load
              if(bufferImage!=null)
                   bufferImage.flush();               
         catch(Exception e){System.out.println("Exception fetchPixels "+e);}
         return true;
    }

  • Is it possible to copy one whole page from one photo-book to another?

    I often want to re-use the same page that I have made in one photo-book, in a new photobook, but I cannot find out of how to copy the whole page. Is it possible?

    No, you can't.  Send a feature request to Apple via http://www.apple.com/feedback/iphoto.html.
    OT

  • Photoshop adds one pixel to images imported from illustrator. Help!

    Whenever I import an image from Illustrator (CC) into Photoshop (CC), it seems that Photoshop is adding ONE PIXEL to the image. For example, if the image is designed at 250x300px in Illustrator, when I bring it into Photoshop, it becomes 250x301px. Since I'm designing for specific web ad dimensions, this is obviously a problem.
    Why is this happening, what might I be doing wrong, and how can I correct this? I appreciate any suggestions/feedback! Thank you!

    Whenever I import an image from Illustrator (CC) into Photoshop (CC), it seems that Photoshop is adding ONE PIXEL to the image. For example, if the image is designed at 250x300px in Illustrator, when I bring it into Photoshop, it becomes 250x301px. Since I'm designing for specific web ad dimensions, this is obviously a problem.
    Why is this happening, what might I be doing wrong, and how can I correct this? I appreciate any suggestions/feedback! Thank you!

  • How to remove only one row from the database using labview6.1

    using labview 6.1 I create a table with various rows and columns and store bulk of data's in them.,, what procedure should I follow to remove only one paticular row from the database? Help me out with an example please,,
    Thanking you in advance!

    Hi,
    If you have the database toolkit you can delete a row using just a SQL Query to "DB Tools Execute Query.VI"
    Example:
    DELETE FROM Table name Where SerialNum='Value' And Date='Value' And Time='Value'
    See also attached VI
    Best Regards
    Johan
    Attachments:
    Delete_a_row_in_a_database_table.vi ‏48 KB

  • Copy single master page from one document to another?

    The answer to a previously posted question seems to involve creating a document differently (than I had). A lot of work went into the creation of the master pages in the original document which I will now need to recreate in the new document. Is there a way I can copy one master page from one document to another?
    Many thanks,
    Theresa

    There are a number of ways to do this.
    Create a copy of the document you want to copy the Master page from. Delete all pages except for the one you want (but you have to leave Right and Left alone as FM must always have these two pages available).
    Open the new document and the one that you want to import the master pages from.
    In the new document:
    Import from Document: (select the document with the Master Page that you want)
    then
    File > Import > Formats
    and select Page Layouts only.
    Note that Right/Left always come along for the ride.
    Alternative and probably best way to get a single Master Page:
    In new document, add a new Master Page and select "Empty".
    In the old document, on the desired Master Page, Select All on page (ctrl+A) and then copy (ctrl+v).
    In the new document on the new master page, paste (ctrl+v) to add the layout. Note: you may need to rotate the page first  if it isn't in the same orientation as in the old document.

  • A 1 pixel row in iPhoto

    When I open iPhoto, (9 of 10) times) I see what appears to be a one pixel row (a line) in iPhoto. I have seen it so far in white, light blue, and today, in magenta. It starts from the side of the program, and usually runs across the program, usually not all the way. It appears in different areas of the program. It is very annoying. I don't see this line, or row in any other applications, AT ALL.
    Does anyone have any idea how to get rid of this annoying line?

    First try deleting the iPhoto preference file, com.apple.iPhoto.plist, that resides in your User/Library/Preferences folder. If that doesn't work log into another account and try iPhoto there. If you get the same lines there then a reinstall of iPhoto is indicated. To do so you'll have to delete the current application and all files with "iPhoto" in the file name that reside in the HD/Library/Receipts folder beforehand. Then install iPhoto from the disk it came on and apply the latest updaters.

  • Deleting Millions of Selected rows from a production Table.

    Hi Friends.
    I have to copy millions of Rows from one table to a second one to do and export of its Data and run a Truncate command after(Second one). The main problem is the Time spend it in the Deleting process. The Inserting is nice and easy with /* +Append */ But The Deleting is a mess because required to much time and make the process really slow....Could someone give me a tip with this issue?  Thanks for your time!
    Emmanuel G. Carrillo Trejos.

    It would help if you could quntify "subset" here. If you are deleting 75% of the table, it will likely be faster to follow Syed's suggestion and move the data you want to keep to a new table, drop the old table, and rename the new table to the old table name. If you are going to be deleting a small fraction of rows, but you are going to be doing this regularly (i.e. you delete all rows older than X days), it will be faster to partition the table and drop the partition.
    I see no possible beneit to playing around with any transaction-related comands.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to delete single row from multiple

    Hi:l
    This is my query which provides duplicate rows in my table:
    select count(*),CUSTMAST_REQUEST_SRNO,ACTIVITYMAST_SRNO,STATUSMAST_SRNO from REQUEST_TRANS having count(*)>1 group by CUSTMAST_REQUEST_SRNO,ACTIVITYMAST_SRNO,STATUSMAST_SRNO;
    O/p:
    2 |M984 | 74 |M6
    2 |M985 | 74 |M6
    2 |M987 | 74 |M6
    2 |M992 | 74 |M6
    2 |M995 | 74 |M6
    2 |M998 | 74 |M6
    Here output shows that CUSTMAST_REQUEST_SRNO M984 having two same rows. And now i want
    to delete any one of row from that. So, how can i apply it for multiple rows ?
    Can any body help-out me in that?
    Thank You,
    Anup Desai
    Edited by: user11688398 on Feb 13, 2013 10:39 PM

    If you want to delete all Duplicates and retain Only One row then Below:
    delete from REQUEST_TRANS a
    where rowid < ( select max(rowid) from REQUEST_TRANS b where a.CUSTMAST_REQUEST_SRNO = b.CUSTMAST_REQUEST_SRNO and a.ACTIVITYMAST_SRNO = b.ACTIVITYMAST_SRNO ... )

  • Copying table rows from one table to another table form

    Hi
    I have a problem about Copying table rows from one table to another table form.On jsf pages if you enter command button go anather jsf page and it copy one row to another table row. But when i execute this process for table FORM it doesn't copy I wrote a code under "createRowFromResultSet - overridden for custom java data source support." Code block is:
    ViewRowImpl value = super.createRowFromResultSet(qc, resultSet);
    try{
    AdfFacesContext fct = AdfFacesContext.getCurrentInstance();
    Number abc = (Number)fct.getProcessScope().get("___");
    value.setAttribute("___",abc);
    }catch(Exception ex){System.out.println(ex);  }
    return value;

    Table may be copied with the
    expdp and impdp utilities.
    http://www.oracle.com/technology/products/database/utilities/index.html

  • Can you copy a build action from one image to another?

    Hello - is it possible to set up a build action for a shape/image and then copy these attributes to another shape/image? I tried to use copy/paste styles however this did not work.
    I need to replicate the same path/build sequence many times over many different objects and I do not want to have to recreate many times.
    Thanks in advance.

    There is no way I know of to replace an object with another object. If you have images, you could create a single object, copy it, and use the "Image Fill" of the object to place the images "inside" it -- if the object is not stroked, it will look like the image, and not the original object, and if it has transparency, like a PDF, those transparent areas will remain transparent. (Note that you can also create PDF images of Keynote objects themselves using the Preview Passthru technique.)

Maybe you are looking for

  • Worst customer support and website in the world!

    I have had bad service from businesses here and there, but Verizon home phone service (which I am forced to use in this location) has amazingly bad customer support and a website from hell! Any tips or tricks how to get any human at Verizon to respon

  • HT204053 How do I access my iCloud from ipad

    I backed up both my iPad 2 and iPhone 4S on the iCloud. How do I view photos and videos taken on my phone on my iPad?  Is there an iCloud app? I see where I can view my new photos on to photo stream but what about my videos and old pictures? Help!

  • Oracle 8.1.7.4 on redhat 7.3 : tablespace creation never ends

    Hi, We're running Oracle 8.1.7.4 on Redhat 7.3. System memory is 256 MB (2x128). After increasing memory to 1Go (2x512) we're facing a strange problem. Tablespaces re-creation hangs, we first drop and then create tablespaces reusing datafiles : DROP

  • Inbound delivery in R/3 system

    Hello all, for the parcel delivery in R/3 system will be created Inbound delivery document and Confirmation (Goods receipt) will be created by requestor in EBP. How is possible to see inbound delivery document in EBP in status of the shopping cart. F

  • Is it possible to develop online interactive adobe form  using abap?

    Hi , We don't want to use webdypro for java or webdypro for abap to develop the online interactive form.but I'm not sure whether abap only  is enough to achieve it?