RescaleOp elements out of order

I'm using the RescaleOp class to apply translucency to an image as needed.
This class takes an array of floats and uses them to scale the elements of a BufferedImage, like this:
float[] scale = { 1f, 1f, 1f, 0.5f };
However, the elements are not in expected order, and this is causing problems because I can't expect the order to always be consistent, and because I don't know how to programatically check the correct image order.
In one case, I have a buffered image of type TYPE_INT_ARGB.
But RescaleOp treats the elements as RGBA, with the last element influencing the alpha.
I have another image, TYPE_4BYTE_ABGR.
In this case, RescaleOp applies the four scale elements in a different order: RABG.
Just out of curiosity, I changed another image to use 4BYTE_ABGR instead of INT_ARGB, but RescaleOp still treats that image as RGBA.
It seems to be totally unpredictable how its going to apply the elements I give it. It does not match the image type.
How do I determine, programatically, what order it wants to treat the elements?

Nevermind.
Predictably, the case where I changed the image to 4BYTE_ABGR yet RescaleOp treated it the same way was a careless error.
So I can reliably use BufferedImage.getType() to get the image type and the element order.
RescaleOp reorders the elements as 1230, so that ARGB becomes RGBA and ABGR becomes RAGB.
I can't fathom why, and its not in the java doc, but it does so consistently, so I can work with that.
Sorry for posting this question before exploring it further. I would delete it, but I'm writing this on here so that if anyone else runs into the same situation, they'll find it on Google.

Similar Messages

  • Webi Report Elements - out of order

    I have a webi with several blocks.  I want this document to display in a publication with the blocks in that order.  However, they do not.
    If I go to the Map\Structure tab in the report editor, it shows the blocks in a different order than they actually appear on the report and apparently the mHTML formatter pays attention to that order.
    Do I have the ability to change the order in that map?

    No breaks or sections, just a few independent blocks.
    What do you mean by adjust the blocks?
      I had to rewrite the Webi - painful.
    Edited by: Stephen Drown on Dec 16, 2010 5:18 PM
    Edited by: Stephen Drown on Dec 16, 2010 5:19 PM

  • Text element of sales order form

    I have a question about the text element of sales order printing form.
    i run a sales order with some price condition (ZKFA) -  VA03 and want to print it out
    before i print it without ZKFA price, it's correct when printing , after input the ZKFA price, all the item detail are missing
    I've checked the SAPScript form ..and see there are many /E (text element) .to control. and i think it's the key ~
    but i don't know how I can debug it step by step in SE71 ...and show the foreground process to know and find where is the problem...
    i don't know which system program is run to control the form text element...

    I'VE CHECKED THE SYSTEM PROGRAM RVADOR01..AND KNOW WHERE IS THE KEY POINT....
    I STILL DON'T KNOW WHY ....IF THE ITEM HAVE THE CONDITION "ZKFA" - AIR FREIGHT ...THEN THAT ITEM DETAIL CAN'T BE SHOW...
    IF I ADD THE CONDITION - ZDI2 - DISCOUNT, IT'S OK FOR SHOWING IN THE FORM.
    I DON'T KNOW WHY CAN'T GET INTO THE ELEMENT ='ITEM_LINE_PRICE_QUANTITY' IF THE ITEM HAS SUBCHARGE - ZKFA
    I SEE THIS CODE IN RVADOR01:
    FORM ITEM_PRICE_PRINT.
      LOOP AT TKOMVD.
        KOMVD = TKOMVD.
        IF SY-TABIX = 1 AND
         ( KOMVD-KOAID = CHARB OR
           KOMVD-KSCHL = SPACE ).
          CALL FUNCTION 'WRITE_FORM'
               EXPORTING
                    ELEMENT = 'ITEM_LINE_PRICE_QUANTITY'.
        ELSE.
          IF KOMVD-KNTYP NE 'f'.
            CALL FUNCTION 'WRITE_FORM'
                 EXPORTING
                      ELEMENT = 'ITEM_LINE_PRICE_TEXT'.
          ELSE.
            CALL FUNCTION 'WRITE_FORM'
                 EXPORTING
                      ELEMENT = 'ITEM_LINE_REBATE_IN_KIND'.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.

  • Data written to socket getting lost?  or perhaps out of order?

    I'm trying to fix a bug in Flashmog. The bug is described in more detail here.
    Basically what is happening is that my Flash client claims that it is calling functions that don't arrive at the server -- or they arrive, but the socket data is out of order and therefore is garbled.  I've stared at the source code for hours and tried a lot of trial-and-error type stuff and added trace statements to see if I can find the problem and I'm not having any luck.
    In particular, there's class I have called RPCSocket that extends the AS3 Socket class so I can serialize data structures before sending them across a socket.  At one point, this RPCSocket class calls super.writeBytes and super.Flush.  It is the point at which I send all data out of my client. The data is binary data in AMF3 format.
              public function executeRPC(serviceName:String, methodName:String, methodParams:Array):void {
                   if (!this.connected) {
                        log.write('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' + serviceName + ' while not connected', Log.HIGH);
                        throw new Error('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' + serviceName + ' while not connected.');
                        return;
                   var rpc:Array = new Array();
                   rpc[0] = serviceName;
                   rpc[1] = methodName;
                   rpc[2] = methodParams;
                   var serializedRPC:ByteArray = serialize(rpc);
                   if (!serializedRPC) {
                        log.write('RPCSocket.executeRPC failed.  Serialization failed for method ' + methodName + ' on service ' + serviceName, Log.HIGH);
                        dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, 'RPCSocket.executeRPC failed.  Serialization failed for method ' + methodName + ' on service ' + serviceName));
                   super.writeUnsignedInt(serializedRPC.length);
                   super.writeBytes(serializedRPC);
                   super.flush();
              } // executeRPC
    Can someone recommend a way for me to store without corruption, conversion, or filtering or translation of any kind *all* of the information sent across this socket? I'd like to write it to a file.  I'm guessing that keep a global ByteArray var and storing the info there might work, but I'm wondering how I might get the contents of that ByteArray into a file so I can inspect it.
    Also, I'm wondering if I might be able to inspect what flash actually sends out on the socket?  I have a sneaking suspicion that data I supply to super.writeBytes may be sent out of order or may not actually get sent across the socket.  This bug I'm talking about only seems to happen under high-stress situations when I'm sending dozens of messages per second across this one socket.

    oops...forgot link to bug description: http://flashmog.net/community/viewtopic.php?f=5&t=549

  • Photos syncing from folder to iPhone all out of order?

    I have 2 folders synced to my iPhone 4 photo app.
    They were previous camera rolls before I set up my phone as a new device. They are all named in order and taken in order, for example IMG_001.jpg was my first picture in my old camera roll. IMG_822.jpg was the last photo taken before I did the backup, and is the last in the folder.
    The folder I am syncing from on my windows computer displays all of the pictures by filename (and because of that, by date) but when syncing with iTunes they end up on the phone ALL out of order. I can't find any rhyme or reason to how they are displaying. Most of the earlier photos show up at the beginning like they should, and the last at the bottom of the scroll appear to be mostly right, but then it's completely random from there.
    I've tried unsyncing them, removing them, and then adding them back again and nothing seems to work. I've even tried renaming the IMG_xxx numbers to different things and they still appear to sync in the same random order.
    Am I doing something wrong, or is this a huge bug for someone with OCD like me? lol

    This is highly annoying.
    I have probably 15-20 Smart Albums in iPhoto 8.1.2 in OS10.6.4 that are syncing to iOS4.0
    On the old software, my Smart Albums for photos would show up AS the smart albums I created. Now they show up in the iPhone one giant mess called "Photo Library".
    I can view photos broken up under "Events" on the iPhone by specific dates, but the dates don't tell me what the name of the event was, and some Smart Albums had multiple dates grouped together in one Smart Album and I don't really want them broken out separately by date. I want them organized how I organized them...
    In short, I want my photos grouped the way I have explicitly grouped them. It used to work, it doesn't now.
    Since iOS4.0 I am also getting sync errors all the time in iTunes. "iPhone cannot be synced because the required file cannot be found." WHICH FILE??? tell me and I will delete it...
    I've rebuilt the entire database in iPhoto (took 4 hours). I've scanned iTunes and removed all broken links and duplicate files. I've scanned the hard drive with the disk tool. I've emptied the iPhone and reinstalled iOS4 on it 5 times. I've turned syncing off for all non-essential applications and stuff I don't actually sync like voice memos. Same problem.
    I think I want my iOS 3 back. I don't really like multitasking anyway, always having to turn off applications for the one or two times in a million where task switching if helpful...
    Ugh....

  • The music I sync into my iPod touch is all literally out of order and in the library it's not. Why is this?

    I checked the starting time for songs in the library and on my iPod and they all say 0:00. What I mean when I say it's out of order is for example, the first ten seconds are skipped and placed somewhere in the middle of the song and some other parts are skipped then played later. I didn't have this problem before I updated iTunes for my new iPod, now when I tried syncing onto my old iPod as well, the same thing happens. So there's nothing wrong with my iPod. I want to know how I can fix this on iTunes or if it's just a glitch on my iTunes?

    Something you can try is resetting it all Settings > General > Reset > Reset all settings. Or go to Settings > Store & sign out & log back in. Another thing you can do is restore your ipod. This has happened to me but the only thing i did was that i created a new account but try doing the things above i just told you. :)

  • Video and audio not sync when i play all forms of video. from music videos, to tv shows. but they play perfect on my iPod. and tv shows display out of order on iPod, but in correct order on iTunes/computer. I even ran a virus check just to make sure.

    audio and video do not syncronize.  all forms of videos. music videos to tv shows.  what do i need to do the syncronize them again
    they are in sync on iPod, but not on computer.
    another issue that might be from the same cause is, the order of episodes of the tv shows i have downloaded,   they appear in order on computer, but on iPod they show out of order.
    any tips on how to fix this would very much help.
    thank you.

    Welcome to Apple Discussions!
    An old version of iTunes will cause this and mess up the videos on your iPod. Always make sure you always use an up-to-date version of iTunes.
    Make sure all the software on your computer is up to date...
    iTunes
    iPod Updater
    Updating iPod's Software
    You will then need to restore the iPod and then let iTunes update your iPod and put your music, videos, etc. back onto your iPod...
    Restore the iPod
    btabz

  • Opening and closing stock with sales order and with out sales order

    hello,
    any body please help me my client want to check opening stock and and closing stock in areport.
    material contains batch and some material with sales order and some are with out sales order. my client is asking this in a single layout. please tell me isthere any teport or bapi or function module to get this report.
    this is very uregent. and layout is requesting like opening stock, production stock, sales stock and closing stock.
    please guide me to get this report.
    Thanks & Regads
    Bhakta

    Transaction MB5B
    For sales order related use specila stock as E and use radio button indicator in stock type
    For stock w/o sales order, use special stock indiactor as "space' and stock type valuated stock.
    to get a perticular month,opening stock/closing stock enter the start date/end date as month start and end date.
    See the o/p which will give the stock as required by you

  • WBS element in PM order

    Hi Experts,
    In PM order in Additional data & Location tab there is WBS Element field may i know from where these two field get updated in bot h the tab.
    AR

    Hi Amit,
    WBS in Location tab (A/c Assignment-screen area) gets copied from equipment master.
    Also see [this|WMS Elements in PM Order; thread for more information.
    Sundar

  • WBS element in work order

    I would like to restrict users to choose WBS elements in work order (in settlement rule and Addit.data - WBS element) depending on WBS type (project type - PRPS - PRART) - does anybody know how to solve it using authorization objects?

    Hi,
    Please use the following steps as reference:
    1.Go to T-Code pfcg
    2.Create a Role by giving a name say “ZPSTEST”
    3.Click on Authorization tab
    4.You will be asked to save the profile first
    5.Go to “ Change authorization data”
    6.Choose “SAP_ALL” and adopt reference.
    7.Confirm “ Yes” to insert all authorization
    8.Go and expand the link “project system”
    9.Expand the link “ PS: Project Manager for Project Definition”
    10.Here you will see two fields “ Activity for Authorization che” and Number of responsible per”
    11.Click on change button on the first field.
    12.Here click on “Cancel full authorization”
    13.Now, here you can choose what all functions you want to assign for this authorization Role.
    14.Choose say “ Display” and save
    15.Click on “ Number of responsible person” and choose any person , say “ XYZ”
    16.Now the authorization role is ready. This setting will ensure that any person who is assigned this role will only be able to “Display” the projects , if the responsible person is “XYZ”
    17.Go back to the pervious screen. In the process” Generate” the profile also.
    18.Once you are in “Change Roles” Screen, go to tab “USER”. Here you can assign this role ZPSTEST to various users.
    Reward points if useful.
    Regards

  • WBS Element in CRM order

    Hi forum!!
    In the ERP order we assign a item of a order to a WBS element and we need to see that WBS element in CRM but that field does not appear in the CRM order!!
    Because of that I think about creating an ERP Order in CRM Order because the WBS element does exist!!but the problem comes here, when I insert the value in the WBS element that value disappears when I press enter or I save the Order.
    Does anyone of yours know something about that??
    Any ideas??

    HI Cecilia,
    I am also need to assign WBS element in service order item,but I can't find that filed.
    Can you share with me?
    Thanks
    Tiffany

  • WBS Element vs investment order

    Good Day,
    Please can someone explain the following..................
    I have CO objects a WBS element and an investment order and I have posted budgeted values to these CO Objects.  I have posted actual values to these Co object via the MM and FI-AA module. 
    When I display the budgeted values for the WBS Element and the invesment order for the fields BPJA-WTJHR the vaules are positive.  Once the actual values are posted to the WBS Element and investment order the values are displayed differently on the table COSP-(WTG001-WTG016).
    For the WBS Element the values are dispalyed as negative on table COSP -(WTG001-WTG016) and for the investment order the values are displayed as postive but both values for the different CO objects are expenditure which has occured via the MM and FI-AA modules  Therefore can someone please explain to me why these values are displayed differently yet the budgeted values are displayed the same.
    Your soonest response would be appreciated.
    Kind Regards
    Ropetra

    Hi
    please gop through this notes it may be help full for you...............
    Planning and Budgeting Measures
    Use
    Using this function, you can plan and budget investment measures, even if they are not already assigned to an investment program.
    Integration
    All of the planning and budgeting functions of orders or projects are at your disposal for the corresponding measures. For more information, see the documentation for the R/3 components,  Internal Orders (CO-OM-OPA) and  Project System (PS) .
    Orders or WBS elements that are assigned to investment programs cannot receive their overall budget by means of the budgeting functions in CO and PS, when the Budget distribution indicator is set in the program position to which they are assigned. Instead, they are limited to receiving their overall budget only by means of the budgeting functions in Investment Management.
    Prerequisites
    Certain restrictions apply when an investment program type is entered in the budget profile of an order or WBS element. When this is the case, the order or WBS element cannot receive overall budget unless you assign it (or a higher-level WBS element ) to an investment program position. Until you make this assignment to a program position, the fields for the overall budget and/or annual budget for orders or WBS elements are not ready for input and cannot be changed.
    Activities
    To plan or budget orders, choose Internal orders ® Planning ® Overall values ® Change or Budget ® Original budget ® Change.
    To plan or budget WBS elements, choose Investment projects ® Planning ® Total costs ® Change or Budgeting ® Original budget ® Change.

  • Keys out of order -- follow up to earlier post

    I ran the install disc Disc Utility Test and the Hardware Test disc on the computer since I posted my first question earlier tonight "Computer won't finish start-up -- any suggestions". The Hardware Test came back fine. The Disc Utility test on the install disc says: Keys out of order. It does not, however, explain how to repair this problem on the hard drive.
    Is there any way to fix this problem on the hard drive?
    Power Mac G4 Quicksilver   Mac OS X (10.3.9)  

    Invest in DiskWarrior. I had the same problem and DiskWarrior fixed it. No other utility programs worked for this problem. DiskWarrior is very inexpensive. Ordered online in the afternoon. It was delivered to my office the NEXT morning.

  • Camera roll pictures are out of order after upgrading to iOS 8.1

    It's nice that iOS 8.1 brings camera roll back. However, pictures are out of chronological order. I'm using iPhone 5s. I upgraded iOS from 8.0.2 to 8.1, and noticed this issue.

    That's weird cause my videos are all interspersed with everything else like they used to be, which unfortunately means it's inconsistently screwing up too.  My pics start with 2007 (first year i got an iphone) then run up to about 2014 vaguely in order, then back to 2013 where everything's all out of order, then down to 2012 again (also out of order), then 2011, 2010, 2009 etc like it's running backwards to 2007.  Then once it hits 2007 again, it jumps to this past july.
    SO aggravating!

  • Is there a way to reorganize out-of-order tracks in iTunes 11?

    Hello all--
    In iTunes 10, if an album appeared with the track numbers out of order, I could just click on the track number tab within each individual album and the tracks would be resorted by track number. In iTunes 11, I can't find a way to do the same thing. For example, I imported an album and now it starts out with track 4, then goes to 15, etc., but can't get them to sort sequentially. Any help would be greatly appreciated.
    I tried looking at one out-of-order album in the "songs" view, based on a similar question, but every time I try to search for the album under "songs" iTunes shows the result under "albums".

    here is a link to macosxhints.com that tells you how to output all of your feed URLs to a terminal window. from there you can cut and paste them into your new feed reader of choice...
    http://www.macosxhints.com/article.php?story=20080319094830396
    and if you are in the marked for a new reader may i suggest David Watanabe's excellent NewsFire. he had just recently made it totally free as a gift to the macintosh community.
    best of luck.

Maybe you are looking for