How to set and read pixels?  AffineTransform?

I understand how the AffineTransform class works but I don't see a way to set the color of and read the color of individual pixels in my JPanel. Any help will be apppreciated.

you can't do that with AffineTransform. AffineTransform let's you translate/rotate/shear/scale before rendering, but you don't have access to pixel values.
Try instead creating an empty bufferedimage, draw into it whatever you want and then you have access to the pixel values via bufferedImage.getRGB()/setRGB().
or you get more basic and manipulate the WriteableRaster of your image directly.

Similar Messages

  • How to set and read cookies in adobe edge animate

    Hi all,
    I need help in writing and reading cookies using adobe edge, is there is a way to do it I serached the internet but I did not find something simlliar?
    thanks in advance

    To test with this plugin in a simple HTML page, you'll need to also include jQuery itself.
    For example:
    <script src="/path/to/jquery.js"></script>
    <script src="/path/to/jquery.cookie.js"></script>
    </head>
    There are a few different ways that you could load the jQuery.cookie plugin into your composition. Regardless of the method, I recommend loading it at the compositionReady trigger. This is the trigger that fires after the composition is ready to play.
    This blog post shows one way to load in external .js files:
    http://chrisgannon.wordpress.com/2012/09/01/loading-external-javascript-in-adobe-edge-anim ate-the-easy-way/
    Here's how you would be applying this method for the jQuery.cookie plugin:
    Then enter in code similar to this:
    yepnope(
        nope:[
          '/path/to/jquery.cookie.js'
      complete: init
    function init() {
    //create your cookie's initial values here
    That would load in the jQuery.cookie plugin.
    It would then be up to you to create/manipulate the cookie's data as needed for your purpose. Most likely, you would scroll to a point in the timeline where you want data to be changed and/or read, add a trigger, then insert the necessary code.

  • How to set and read a variable in a UIX page

    In a similar fashion to how JSP works, I need to set a variable if a certain condition occurs at a specific processing point in my UIX page, and then conditionally create output in the page based on the value in my variable. How can this be done in UIX?
    Brad

    Hi ,
    Decalring the Varible :
    <?xdoxslt:set_variable($_XDOCTX, 'var', 0)?>
    Do the calculation :
    <?xdoxslt:set_variable($_XDOCTX,'var', xdoxslt:get_variable($_XDOCTX,'var‘)+ XML columnname)?>
    Display the Variable :
    <?xdoxslt:get_variable($_XDOCTX, 'var')?>
    Declare the varaible before your loop starts.Do the calculation part inside the loop so for each row it will be updated.
    Display the results where you want using the form field and place the display varaible syntax.
    Hope this will helpful for you.
    Thanks,
    Ananth

  • How to set and save Custom Print Settings in Aperture?

    How to set and save Custom Print Settings in Aperture
    Hi,
    I am printing 12x18" images on 13x19" sheets. I find it difficult to enter the 13x19" dimensions because each value jumps to another random value when I move to enter the second dimension. For instance 13 jumps to, say, 8.5 as I type 19 into the second box. Same with the sheet dimensions.
    Also, when I finally get it all correctly, the margins don't set themselves automatically - which I would I expect.
    Then, even though I save the setting by clicking Save Setting at the gear below, next time I turn Aperture on, it's all gone.
    Any ideas? Thanks.
    Raphael

    For me, it is working with these settings, Raphael.
    Does your image have a 12x18" aspect ratio? You may want to crop it to the desired aspect ratio before printing.
    I can only test with Aperture 3.6 on Yosemite 10.1.

  • How to set and resent reconcilation a/c for Assent a/c

    hi
    how to set and resent reconcilation a/c for Assent a/c
    amk

    You are permitted to post the recon account undercertain special circumstances :
    USe the transaction codes OAMK and OASV.
    Kindly read the SAP on line documentation before making a postings directly to the recon account.
    Definition of the Reconciliation Accounts
    You are not allowed to manually post to the reconciliation accounts for Asset Accounting in Financial Accounting. Normally, you designate the corresponding General Ledger accounts in Financial Accounting as reconciliation accounts. This change, however, can no longer be made in Financial Accounting, once these accounts already have balances from the legacy data transfer. However, you can use a special report to assign these accounts the status of reconciliation accounts in Financial Accounting (in Customizing for Asset Accounting, choose Preparing for Production Startup ® Production Startup ® Set Reconciliation Accounts).
    There is another report for removing this specification (Reset Reconciliation Accounts).
    Subsequent Correction Postings to Reconciliation Accounts
    Suppose you have already defined the asset G/L accounts in Financial Accounting as reconciliation accounts, but still need to transfer balances to these accounts, or make corrections. You can make correction postings to these reconciliation accounts with a special posting transaction in Customizing for Asset Accounting (Transfer Balances), using posting key 40 or 50. You can only postings to those accounts in a company code with implementation status (Customizing for Asset Accounting, choose Preparing for Production Startup ® Production Startup ® Activate Company Code).

  • If user disable cookie how to set and use session with URL Rewritting

    if user disable cookie how to set and use session with URL Rewritting by append session ID in url

    If cookies are disabled, then app server will automatically try to use URL rewriting for session control. Programmer's responsibility is to encode any links or redirects using
    response.encodeURL("/yourPage.jsp")
    and
    response.encodeRedirectURL("/yourPage.jsp")
    See API for details
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String))

  • How to get and read a file from META-INF directory

    how to get and read a file from META-INF directory in a EJB project

    Use this.getClass().getResourceAsStream("/META-INF/filename");This should work. Probably, you would need to set the Manifest Class-Path attribute.

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • How to set and retrive the index log path stored by parameter LOG_DIRECTORY

    how to set and retrive the index log path stored by parameter LOG_DIRECTORY.

    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • How to write and read data in a specific memory location ??

    Hi Everyone:
    Does anyone know how to write and read data in a specific memory location by using Java ?
    I need pointers, but I don't know how to do it ??
    Thanks for answering
    Rodger

    Hi Everyone:
    Does anyone know how to write and read data in a
    specific memory location by using Java ?
    I need pointers, but I don't know how to do it ??
    Thanks for answering
    RodgerWith Java you cannot write to a specific memory location. Java does not have pointers. If you really want to do it, you need to use JNI, i.e write the required functions in C (or other languages that support pointers) and make those functions available to Java (through JNI). This approach is not portable. You can have a look at http://java.sun.com/docs/books/tutorial/native1.1/index.html
    Regards.

  • How to write and read array on ObjectOutputStream............??

    Hello All...........,
    I have done some code for applet and servlet communication in which i writes "String " as an object and gets reply from servlet as a string as follows:
               // send data to the servlet
                            String input="hello there.....";
                   URLConnection con = getServletConnection();
                   OutputStream outstream = con.getOutputStream();
                   ObjectOutputStream oos = new ObjectOutputStream(outstream);
                   oos.writeObject(input);
                   oos.flush();
                   oos.close();
                   // receive result from servlet
                   InputStream instr = con.getInputStream();
                   ObjectInputStream inputFromServlet = new ObjectInputStream(instr);
                   String result =(String) inputFromServlet.readObject();
                             outputField.setText(result);
                           //outputField.setText("good morning");
                   inputFromServlet.close();
                   instr.close();This code is same at servlet end.
    But now i want to pass an int array.How to pass int[] as an object.
    It is giving me error if i pass int array as int array[]={1,2,3}; oos.writeObject(array); Why is it so?
    Can anybody tell me how to write and read int array[].
    Thanks.
    Shraddha.

    hello kaj,
    I am trying to write as follows
    while writting:
    int array[]={1,2,3,4,5};
    URLConnection con = getServletConnection();
    OutputStream outstream = con.getOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(outstream);
    oos.writeObject(array);
    oos.flush();
    oos.close();
    while reading:
    InputStream instr = con.getInputStream();
    ObjectInputStream inputFromServlet = new ObjectInputStream(instr);
    int result[] =(int []) inputFromServlet.readObject();
    Thanks,
    Really imp for me.

  • How to set up read receipts?

    how to set up read receipts?

    Mail can send a read receipt request:
    http://forums.macrumors.com/showthread.php?t=1183650
    However, note that read receipts are extremely unpopular, because of privacy issues as well as abuse by spammers (verifying addresses by using read receipts).  Most savvy users have this feature turned off, if their e-mail client even supports it, which many don't.  So not receiving a read receipt tells you absolutely nothing.  That makes the entire read receipt system pretty much useless.
    Mail will not, ever, respond to a read receipt request.

  • How to set the read only property for dynamic ALV column

    Hi All,
    I have built one dynamiv ALV and I have one name column inside that ALV for which I have to set read only property based on two column fields that exist in the same ALV,say IS_SP and IS_CORP of type boolean.
    If any one of the flag is 'X',i have to make that name column as display only and
    If both flag are not set,it should be displayed as ediatable column.
    I have written one method as INIT_ALV which gets called when ALV is loaded.
    Code is as  follows:
      lr_column_settings ?= wd_this->alv_all_roles.
      lt_columns = lr_column_settings->get_columns( ).
    LOOP AT lt_columns INTO ls_column.
    CASE ls_column-id.
       WHEN <NAMECOLUMN>. "name column which should be editable/display
    Create Input Field
            CREATE OBJECT lr_uie_input_field_ro
              EXPORTING
                value_fieldname = ls_column-id.
         ls_column-r_column->set_cell_editor( lr_uie_input_field_ro ).
        After this,I have to set the read only property based on IS_SP and IS_CORP values,
              CALL METHOD lr_uie_input_field_ro->set_read_only_fieldname
              EXPORTING
                *value = 'IS_SP' or 'IS_CORP'
    ENDLOOP.
    I dont want to use cell variants also.
    Help me to achieve this.
    Thanks and Regards,
    Divya

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • How to release and read another external file

    My vi is set to read an external file (a previously collected force plate signal), then perform a string of analyses on it and finally save the analytical output. Currently, "Read from measurement file" is outside the while loop containing all of my analysis.
    Without completely restarting the vi, I would like to be able to release the file and load another.  How might I do this?  
    Thanks!

    I would do several things to clean up the block diagram.
    whenever you have multiple outputs that are related to each other (PF, F100, F150, F200, F250, etc...) or all of the RFDs and Impulses, you can bundle them together and then display them with one big cluster, or as an array, if that makes sense.  This will reduce your total number of outputs and maybe improve organizaiton.
    If you have a seqeunce of functions that go together, you can combine them into a SubVI to save blockdiagram space and making things more logical.
    If you have several places where the same sort of function is being done, (for example, you have Extract-Statistics-Formula several times and Extract-Integral-Statisics several times) you can make this into a sub-VI and then loop through it.  That way you can execute the function multiple times (with slight changes on each loop), but you only have to have the code written once. It also makes it much easier to improve the code because you only have to make one change instead of four. 
    The attached VI shows two ways of doing something.  On the left is your code, which is four sets of the same thing.  On the right, I've taken this code and put it into a loop so it does the same thing four times.
    Attachments:
    Simplified Code.vi ‏896 KB

Maybe you are looking for

  • Hi my iphone 4s is disabled and needs to be connected to itunes but when i try to connect it to itunes a prompt appears and says the phone is locked put in a password. what can i do?

    my sons iphone 4s is saying "disabled connect to iTunes". but when I try to connect it to iTunes I'm prompted that the phone is locked and needs to be unlocked in order to connect to iTunes. What can I do?                                             

  • UnZip Paylaod....

    HI All, I am doing on File -> File Scenario. My Source File is a ZIP File(contains .txt file with tab delimeter). I need to unzip the file and sent to the target system. Currently I developed the scenario using payloadZipBean. If the ZIP File contain

  • Mutiple Deleets

    Hi Guru's I have mutiple deletes lets say like this, How can i have inner query repeting for all the deletes, i have such seven deletes. Is there any way i can avoide inner query and get it only once. Help please. PID is the varibale values from curs

  • Lessons Learned Migrating from BOXI R1 to BOXI R2

    Post Author: tmiller CA Forum: Deployment Some notes from our upgrade from Release 1 to Release 2 to, hopefully, prevent headaches in other users: Make sure you have your Release 2 license keys, Release 1 keys won't work (check with your vendor if yo

  • Key Logger Check Please

    I have a MacBook Air with OSX 10.8.5. I have done the steps found on other threads and can't tell if I do or not. Thanks anyone for their help. Here are my results. Last login: Wed Jan 22 10:41:29 on console Macintosh:~ shanecook$ $ -bash: $: command