Compositing aliasing When using Key light

Good morning all,
My office has been having and issue when we composite green screen footage in AE using keylight.  We are all on the new Mac Pros, running Yosemite 10.9.5 or newer and the latest version of CC.  We generally work with footage shot on a Sony EX 3 at 1080/23.97p, (Though I have run into this issue on multiple systems with various types of footage ranging from the a-fore mentioned to 4K from the red.)  It has happened when we round trip out of Avid MC as well as when we bridge footage out of Premiere Pro.
What is happening is, when we key something, or if we add a layer for jelly bugs or lower thirds graphics, a gray bar will show up for a frame, generally, across the top third of the screen spanning the entire width and approximately 20 pixels high.  Has ANYONE else run into this?  What causes it and how do we fix it so that it never happens again.
I am assuming there is something in our process that is causing it since I have been able to replicate it on systems from Orlando to Michigan and all 3 of our systems in my office. Any information would be most helpful.

Transcode the footage to be keyed to an intermediate codec before you use Keylight.  Don't use the footage straight out of the camera.  And purge your caches frequently.
I presume you're w4ell aware that the first step to a good key is good lighting, and that you have it.

Similar Messages

  • No values when using key figure with constant selection?

    Hi experts,
    I have built a Webi on top of a universe that is sitting on top of a Bex query.
    In my Bex query I have a bunch of key figures defined that are restricted on time and category.
    This Webi works fine.
    Then I added an additional key figure that required a constant selection on time and on category.
    When I first added this to my Webi report it was fine. But once I refreshed my report showed no values.
    The report still seems to know that it is meant to retrieve values because it is bringing back the correct records - just no values. (ie I am showing time in my columns and it's showing the correct periods that are meant to have data)
    I refreshed a number of times and sometimes it would bring "#TOREFRESH" in some cells but once I refreshed again the cells are blank. Sometimes it would even show me a value in a couple of cells and others would show the "#TOREFRESH"
    I went back to my Bex query and removed the key figure with constant selection and the report is working again?
    Has anyone experienced something similar? Is there a way to make this work?
    Thank you!
    Sabine

    #TOREFRESH error message appears for smart measures (measure object with aggregation type Database Delegated) when the context for the measure is changed. Refreshing data will solve the issue. Database delegated measures are used for some non-additive aggregation which webi is not able to handle properly. If you are not using such aggregation, then tou can change the aggregation type to something other than database delegated to avoid #TOREFRESH.

  • Fix for illustrator, InDesign and Photoshop crashing when using keys place

    I suffered too long and couldn't find a solution under I read this. I wanted to pass it on to you so I can give back.
    Everytime in illustrator when I tried to relink my files or place something, it would crash. In InDesign the same thing if I exported. I know there are many more, but those were the ones that I was using. Go here:
    http://kb2.adobe.com/cps/402/kb402521.html
    viola!!

    Nini's probably right. But I remember having the same sort of trouble in Illy5. There was some sort of conflict between Acrobat and Illy so that when you had been using Acrobat and then switched back to Illy it became impossible to place images or select already placed images without Illy crashing. The crash was so pervasive that you had to restart your machine to get things back on track; it wasn't enough to just restart Illy. We never discovered the reason but the problem disappeared on upgrading to Illy6.

  • Possible bug when using Key Command

    Greetings,
    Can someone confirm this behavior in Logic 9? When I'm editing a plugin and hit my key command to go to a location, enter the measure # and hit enter - all **** breaks loose. It's as though I'm scrolling through a bunch of screensets and the enter location window still stays on top.
    Am I the only experiencing this? Misery sure does love company.
    Cheers

    fyi, it looks like this issue has been resolved with jdev 11.1.1.0.2 (Update 2)

  • Add to favourites disabled when using light framework page

    Hi,
    When using the light framework page our "add to favourites" link is disabled. If we instead use the normal framework page add to favourites in the dropdown menu works. Does anyone have an idea why this could be?
    Regards
    Mattias

    Hi,
    The reason why I decide to use Light Framework, itu2019s because Iu2019m creating an EFP, and Iu2019m using the WPC to publish the content (articles, news, and link list), using the standard Web Forms.
    The problem is, after adding to a WPC Page something so simple like an article (using the Web Form Article), no Portal iView, HTMLB or other stuff included, the preview of the WPC Page using the Default Framework Page is ok, but when using the Light Framework Page, the text in the article doesnu2019t have the correct font-family. It looks like there are some styles missing in the Light Framework Page, that WPC content is expecting.
    Thanks and Regards,
    John

  • No style applied when using light framework and WPC content

    Hi,
    Iu2019m facing a strange behavior, and Iu2019m almost pretty sure that is an error in the WPC, but I decided to post it here, maybe someone can confirm it. When using both, Light Framework and WPC, for some reason, the text inserted in the WPC containers, using the Web Forms, doesnu2019t appear correctly (no style/font applied), but viewing the same information, using the Default Framework Page, it works correctly.
    Any hint?
    Thanks and Regards,
    John

    Hi,
    The reason why I decide to use Light Framework, itu2019s because Iu2019m creating an EFP, and Iu2019m using the WPC to publish the content (articles, news, and link list), using the standard Web Forms.
    The problem is, after adding to a WPC Page something so simple like an article (using the Web Form Article), no Portal iView, HTMLB or other stuff included, the preview of the WPC Page using the Default Framework Page is ok, but when using the Light Framework Page, the text in the article doesnu2019t have the correct font-family. It looks like there are some styles missing in the Light Framework Page, that WPC content is expecting.
    Thanks and Regards,
    John

  • Solution to After Effects CS 5.5 crash when using eyedropper?

    I have a 2014 Mac running Yosemite, and I recently downloaded the Adobe Master Collection from the CD onto my new laptop. I have had no problem running this program on other mac's before, but for some reason whenever I open it now and try to use the eye dropper tool, the whole app crashes. This happens every time I try this. Typically this is not a big deal for my needs, but I am currently trying to use Key Light to key out a green screen. If anyone has any idea on how to fix this problem please help, or any other way to key out a green screen. (P.S. I am also having a similar problem with Adobe Premier and so I can not use that to key either).

    Some people have had success changing the preferences to use the system color picker.
    Again, this is not a supported OS for running AE. It's not a good idea to try to use such old software on a new OS in a production environment. I'd recommend using an older OS or a newer AE. (I vote newer AE - there are some great new features!)

  • Apple TV3 turns off and on when using remote, already reset and restarted.

    Apple TV just started acting up yesterday.  When using remote, light on Apple TV would turn off and on so it would somewhat work when the light was on and would not when light when off.  When light is off and in a menu selection, cursor would just move to the end of the list and stop.  Already restored back to factory and reset it.  Difficult to program after reset when remote only works part of the time when the light goes on so stuck in out of the box condition.  Any help on this?  Thanks!

    Hello stiktani,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning Apple TV remote issues:
    Apple TV (2nd and 3rd generation): Resolve issues with Apple Remote
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • Having a real difficult time with Key Light

    I'm reading Mark Christiansen's After Effects CS4 Studio Techniques and Ive read the section on using Key Light 5 times and still cant get a key like his examples.  I'm trying to conquer two things that just are seeming impossible. One to retain the whisps of hair blowing in the wind and 2, to get rid of the green spill on the edges.  I've tried the 3 Pass Method, which he does not very cleary explain,and I cant get the edge matte that it is supposed to produce.  He leaves some of the important infomation written in the side notes, and other things are just plain confusing and he does not make clear reference to the examples on the DVd.
      Can anyone help me conquer this keying or at least point me in the direction so that I can learn this Step by CLEAR Step.
    Thanks.

    Hi there,
    The principle here is simple - it sounds as though the execution is what's tripping you up.
    First, let's get the principle straight. The whole reason to do this is to avoid using Keylight for anything but your edges in order to give them the subtlest possible threshold. This means breaking apart the image, and the most elementary way to do it is to start with three passes: a garbage matte to get rid of background noise/rig that doesn't cross the edges, a holdout matte to get rid of holes in the matte, and finally the edge pass. In more complicated shots it is necessary to break the image down further, for example doing one edge pass for hair and another for the body, etc.
    So you can start by just applying Keylight and creating your key.
    What I have you doing if that doesn't simply solve your key is to spread the resulting matte (using Simpler Choker with a negative value) so that it's well outside the edges to create the garbage matte. In the previous CS3 version of the book I instructed that you do this on a separate layer and use Stencil Alpha blending mode to apply the result to the layers below, one for the edge matte and one for the holdout matte. You can still do it that way if it's clearer.
    Otherwise, on a single layer the steps are
    1. apply Keylight, refine the matte and then leave the View menu set to Intermediate Result - that's important, it insures no color shift
    2. spread the matte with Simple Choker, set to a negative value (usually in the low double-digits)
    3. apply Keylight again to get your edge matte
    And after that, if there are holes in the matte, fix them by masking out a separate layer of the same source, below all of the others.
    I hope that helps.
    Mark Christiansen
    Author, After Effects Studio Techniques

  • No content loads when using portal links

    We recently upgraded from 3.0.9.8.2 to 3.0.9.8.5 and in the new version we are having issues with our favorites portlet as well as any links that users create to send to other users. In the new version, after a user logs in, if they click on a saved favorite link, the new page does not load. The tabs at the top of the screen stay and the content of the page is left blank. The same thing happens if you copy a link into the browser window after logging in. However, if you navigate to the tab that the link is going to, and then go back to the login page and use the link, it works fine. We have a TAR logged with Oracle and they do not know what is wrong. Has anyone experienced a similar problem or know a solution?
    After testing, we came up with something interesting. When we were creating favorites, we were going to the page we wanted, copying the URL, and pasting it into a favorite. This URL is fairly short. Just now I tried right clicking on the folder I wanted to make a favorite and copying a shortcut. This URL is much longer (although it should point to the same place as the short one). When I tested the favorites, the first URL loaded a blank screen (as you saw in the ODC), but the second loaded the page correctly. I went back to our System Test environment to make sure that the problem does not exist there (this instance is still 3.0.9.8.2). Both the short URL and the long URL worked. Why should patching the portal cause the short URLs, which worked before, to
    stop loading pages correctly? Here is an example:
    Portal Production (3.0.9.8.5)---------------------------------------------------------------------------
    URLs for My Regional tab
    WORKS(right-click and copy shortcut)
    http://portal.us.colorcon.com:7777/pls/cc_prod/CC_INTRANET.wwpob_page.changetabs?p_pageid=952&p_regionid=2264&p_portletid=956&p_mainpageid=952&p_mode=3&p_debug=0&p_back_url=http%3A%2F%2Fportal.us.colorcon.com%3A7777%2Fservlet%2Fpage%3F_pageid%3D952%2C956%26_dad%3Dcc_prod%26_schema%3DCC_INTRANET
    BREAKS(navigate to page and copy URL)
    http://portal.us.colorcon.com:7777/servlet/page?_pageid=952,956&_dad=cc_prod&_schema=CC_INTRANET
    URLs for QA Tab under My Knowledge (this is a sub-tab)
    WORKS(right-click and copy shortcut)
    http://portal.us.colorcon.com:7777/pls/cc_prod/CC_INTRANET.wwpob_page.changetabs?p_pageid=952&p_regionid=2277&p_portletid=997&p_mainpageid=952&p_mode=10&p_debug=0&p_back_url=http%3A%2F%2Fportal.us.colorcon.com%3A7777%2Fservlet%2Fpage%3F_pageid%3D952%2C954%2C960%2C997%26_dad%3Dcc_prod%26_schema%3DCC_INTRANET
    BREAKS(navigate to page and copy URL)
    http://portal.us.colorcon.com:7777/servlet/page?_pageid=952,954,960,997&_dad=cc_prod&_schema=CC_INTRANET
    Portal System Test (3.0.9.8.2)-------------------------------------------------------------------------
    URLs for My Regional tab
    WORKS(right-click and copy shortcut)
    http://hercules.us.colorcon.com:8020/pls/cc_prod/CC_INTRANET.wwpob_page.changetabs?p_pageid=952&p_regionid=2264&p_portletid=956&p_mainpageid=952&p_mode=3&p_debug=0&p_back_url=http%3A%2F%2Fhercules.us.colorcon.com%3A8020%2Fservlet%2Fpage%3F_pageid%3D952%2C956%2C960%2C964%2C48%2C47%2C614%2C50%2C103%2C49%26_dad%3Dcc_prod%26_schema%3DCC_INTRANET
    WORKS(navigate to page and copy URL)
    http://hercules.us.colorcon.com:8020/servlet/page?_pageid=952,956,962,964,48,47,614,50,103,49,1006,1020,1154,1060&_dad=cc_prod&_schema=CC_INTRANET&2086_IT_EBUS_PROJ_93987.p_subid=83600&2086_IT_EBUS_PROJ_93987.p_sub_siteid=1&2086_IT_EBUS_PROJ_93987.p_edit=0

    Hi,
    The reason why I decide to use Light Framework, itu2019s because Iu2019m creating an EFP, and Iu2019m using the WPC to publish the content (articles, news, and link list), using the standard Web Forms.
    The problem is, after adding to a WPC Page something so simple like an article (using the Web Form Article), no Portal iView, HTMLB or other stuff included, the preview of the WPC Page using the Default Framework Page is ok, but when using the Light Framework Page, the text in the article doesnu2019t have the correct font-family. It looks like there are some styles missing in the Light Framework Page, that WPC content is expecting.
    Thanks and Regards,
    John

  • When using the text box( typewriter ) It appears black but when I click away it is a lighter grey. I am using Adobe Acrobat Pro 10.1.13

    When using the text box( typewriter ) It appears black but when I click away it is a lighter grey. I am using Adobe Acrobat Pro 10.1.13
    . How do I fix this? It never used to do that.@

    Hi cj0094,
    Please try changing the registry key HKCU\Software\Adobe\Adobe Acrobat\10.0\Annots\cAnnots\cfreetext_003_afreetexttypewriter and change the opacity back to 1. This should reset the color to black.
    Note: Please backup the registry before modifying it.
    Regards,
    Rave

  • Numlock key lights up when I press F5 and no chime is heard on start up

    HI,
    I have a 12" iBook G4 with a broken screen. So, I cannot see anything on the screen, but till a couple of hours back I could hear the start up chime. I connected it to an external monitor to see if it shows anything. Nothing came up on the screen. So, I pressed all combination of buttons on the keyboard. After that nothing is working. The numlock key lights up when I press F5 and not F6. I inserted a CD, but it doesn't come out when I press F12. The Caps Lock is working fine. Any help will be appreciated! I want to use my iBook with an external monitor.
    Thanks!

    kajari:
    Welcome to Apple Discussions.
    Have you tried starting up in Safe Mode?
    You might also want to try this procedure: Resolve startup issues and perform disk maintenance with Disk Utility and fsck.
    cornelius

  • Sy-tabix when using secondary key

    Hi,
    I have an internal table with records that contain a field with the line index of another table entry that they depend on.
    I can process this table recursively, by passing the parent index inside and using a
    LOOP AT ... USING KEY secondary_key WHERE index = iv_index.
    Unfortunately the sy-tabix is afterwards not correct, it contains the position in the secondary key probably instead the position in the internal table.
    Is there a way how I could find out the current table index, when using a secondary key to read a record?
    Regards,
    Bruno

    I rewrote it to include the row index also, not only the dependency.. was thinking too generic

  • Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems n

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

  • Odd behavior when using custom Composite/CompositeContext and antialiasing

    Hi,
    I created a custom Composite/CompositeContext class and when I use it with antialiasing it causes a black bar to appear. I seems it has nothing to do with the compose() code but just that fact that I set my own Composite object. The submitted code will show you what I mean. There are 3 check boxes 1) allows to use the custom Composite object, 2) allows to ignore the compose() code in the CompositeContext and 3) toggles the antialiasing flag in the rendering hints. When the antialiasing flag is set and the Composite object is used the bar appears regardless of if the compose() method is executed or not. If the Composite object is not used the bar goes away.
    The Composite/CompositeContext class performs clipping and gradient paint using a Ellipse2D.Float instance.
    a) When the Composite is not used the code does a rectangular fill.
    b) When the Composite is used it should clip the rectangular fill to only the inside of a circle and do a gradient merge of background color and current color.
    c) If the compose() method is ignored then only the background is painted.
    d) When antialiasing is turned on the black bar appears, i) if you ignore the compose() method it remains, ii) if you do not use the Composite object the bar disappears (???)
    NOTE: the compose method's code is only for illustration purposes, I know that AlphaComposite, clipping and/or Gradient paint can be used to do what the example does. What I am trying to find out is why the fact of simply using my Composite object with antialiasing will cause the odd behavior.  Been trying to figure it out but haven't, any help is appreciated.
    Thx.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                for(int sy = src.getMinY(); sy < src.getMinY() + src.getHeight(); sy++) {
                    for(int sx = src.getMinX(); sx < src.getMinX() + src.getWidth(); sx++) {
                        int cx = sx - dstOut.getSampleModelTranslateX();
                        int cy = sy - dstOut.getSampleModelTranslateY();
                        if(!clippingShape.contains(cx, cy)) continue;
                        srcPixel = src.getPixel(sx, sy, srcPixel);
                        int ox = dstOut.getMinX() + sx - src.getMinX();
                        int oy = dstOut.getMinY() + sy - src.getMinY();
                        if(ox < dstOut.getMinX() || ox >= dstOut.getMinX() + dstOut.getWidth()) continue;
                        if(oy < dstOut.getMinY() || oy >= dstOut.getMinY() + dstOut.getHeight()) continue;
                        dstPixel = dstIn.getPixel(ox, oy, dstPixel);
                        float mergeFactor = 1.0f * (cy - 100) / 100;
                        dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                        dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                        dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                        dstOut.setPixel(ox, oy, dstPixel);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

    I got a better version to work as expected. Though there will probably be issues with the transformation to display coordinates as mentioned before. At least figured out some of the kinks of using a custom Composite/CompositeContext object.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
    //            dumpRaster("SRC   ", src);
    //            dumpRaster("DSTIN ", dstIn);
    //            dumpRaster("DSTOUT", dstOut);
    //            System.out.println();
                if(dstIn != dstOut)
                    dstOut.setDataElements(0, 0, dstIn);
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                int w = Math.min(src.getWidth(), dstIn.getWidth());
                int h = Math.min(src.getHeight(), dstIn.getHeight());
                int xMax = src.getMinX() + w;
                int yMax = src.getMinY() + h;
                for(int x = src.getMinX(); x < xMax; x++) {
                    for(int y = src.getMinY(); y < yMax; y++) {
                        try {
                            // THIS MIGHT NOT WORK ALL THE TIME
                            int cx = x - dstIn.getSampleModelTranslateX();
                            int cy = y - dstIn.getSampleModelTranslateY();
                            if(!clippingShape.contains(cx, cy)) {
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                dstOut.setPixel(x, y, dstPixel);
                            else {
                                srcPixel = src.getPixel(x, y, srcPixel);
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                float mergeFactor = 1.0f * (cy - 100) / 100;
                                dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                                dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                                dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                                dstOut.setPixel(x, y, dstPixel);
                        catch(Throwable t) {
                            System.out.println(t.getMessage() + " x=" + x + " y=" + y);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            protected void dumpRaster(String lbl,
                                      Raster raster) {
                System.out.print(lbl + ":");
                System.out.print(" mx=" + format(raster.getMinX()));
                System.out.print(" my=" + format(raster.getMinY()));
                System.out.print(" rw=" + format(raster.getWidth()));
                System.out.print(" rh=" + format(raster.getHeight()));
                System.out.print(" tx=" + format(raster.getSampleModelTranslateX()));
                System.out.print(" ty=" + format(raster.getSampleModelTranslateY()));
                System.out.print(" sm=" + raster.getSampleModel().getClass().getName());
                System.out.println();
            protected String format(int value) {
                String txt = Integer.toString(value);
                while(txt.length() < 4)
                    txt = " " + txt;
                return txt;
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

Maybe you are looking for

  • Is the ATV2 a true Apple Appliance or a Toy?

    Having spent a few hours studying all the problems that people are having, I am amazed at the difficulty the ATV2 is causing. It was supposed to be the transformational device that did not replicate the problems of the ATV1 which was a "hobby" device

  • Bootcamp problem please help

    Hi, I've been having this problem for weeks now. I was able to intall windows 7 using bootcamp, which I did numerous times with my previous macs. Today, I wiped my harddrive, and fresh installed OSX and windows 7 everything went perfect up to the poi

  • Ignoring white lines in a file parsed with Scanner

    I've a little problem... How to ignore white lines in a file (for configuration informations) parsed with Scanner??? My parser can ignore #(comments) and other thing, but not white lines... oooo fucking little problem!!! Thank for solutions... eurony

  • Batch input questions

    Hi. Can someone explain me teh diferences between =mod and =ins in a batch input? i know that one is for modify and the other one id for insert, but my question is if i use the =ins code and if there is allready a registry with data in the fields tha

  • Help with packages and classpath

    Heya, first off, i use textpad to compile my java, i don't do it via the command line. my problem is faily simple, i think. i've got a main class and i'd like it to import a custom class from a subdir. Main class is in C:\Documents and Settings\David