SVT: limits not visible in CBRC20 (wrong color of light)

Hi,
we are running a pilot project for SVT. It's working quite nicely but we do have an issue regarding the color lights in CBRC20. We see red colors although we have maintained a tonnage band in the property tree and the tonnage band is also shown in table CCRCT_EHS_SLIMIT (the Value is 3, which means 10 to 100 tons). The collected quantity for the test substance is 22.4 tons but the light in CBRC20 is red and in field AMOUNT_LIMIT it shows 1 to.
Why is the system showing the wrong value (1 to instead of 100 to) and why is the light red? Do you have any idea?
Kind regards, Michael

Dear Michael
welcome in the world of "Substance Volume Tracking". The table CCRCC_EHS_SLIMIT does have a "special" use in SVT. Shortly:
a.) if you registered e.g. CAS 50-00-0 for pompany "Exxon" in > 100 t/a you maintained this data according to SAP EHS SVT standard model in property: "Registration (company-specific) "
b.) then you apply some general threshold limits for "warnings" etc. (50% of a value) in the customizing
Now if the substance is aggregated per company code in such a way that 50% of 100 T/a is exceeded you get a warning etc. (online checks etc.) if you have prepared a proper set up.
Now by using property "Specific Quantity Limits (SVT)" you  "overwrite" these general threshold limits and system reactions. E.g. you can specify that regarding 50-00-0 you would like to get the warning not with 50% but with 40% etc.
As we are not using CCRCC_EHS_SLIMIT as you are doing it, so I can provide you only the feedback that the "trafic" light should be "calculated" by using at least the  data in CCRC_EHS_REG and the "general limits" and based on the amount aggregated.. Please check if you have entries for the same specification in CCRCC_EHS_REG and check your general SVT customizing regarding the "general" warning limits (as well you should check general customzing so that CCRCC_EHS_REG would be populated properly).
So in most cases according to my experience there is no need to maintain data in "Specific Quantity Limits (SVT)"  to use SVT properly
May be execute a cross read in: Substance Volume Tracking using SAP EHS MANAGEMENT; might help.
C.B.
PS: may be check SAP online help as:
http://help.sap.com/erp2005_ehp_07/helpdata/en/46/136efcbe9e5876e10000000a11466f/content.htm?frameset=/en/43/94291f1122345be10000000a422035/frameset.htm&current_toc=/en/a7/288aa30a6c11d28a220000e829fbbd/plain.htm&node_id=29
Classes, Value Assignment Types, and Characteristics for SVT - Product Safety (EHS-SAF) - SAP Library
Data Transfer from Property Tree - Product Safety (EHS-SAF) - SAP Library
Quantity Limits - Product Safety (EHS-SAF) - SAP Library
PPS: on CBRC20 you can display two types of "Status": The "Over all status" for tracked substance and the specific status for matweeriL; specification, tracked substance relation. In your screen only the overall status is shown. May be check your used layout; In most cases to have both status displayed is better
And last but not least: which SAP release do you use (indicate at least support pack and major SAP release) ? Do you use SAP Standard or did you adapted CBRc20 (you can "modifiy" if needed the "trafic" light display)? Any activation of Enhancements doen as part of "buisiness functions"?

Similar Messages

  • Photosmart premium 320 not printing good photos wrong colors sharp but loss of detail never befo

    i have a photosmart premium about 3 yrs old.   always got good results when printing photos but now photos are printing with extremely saturated colors, loss of some detail but main subject is very sharp as it should be.   i've used photoshop elements 8 as well as other editing programs.   i don't know why this is happening now.   i've got through all the steps that i can possibly do - that i know of but it's getting frustrating even though some of the effects are quite interesting (but i don't what them)    For example, a picture of a plant was great but the background came out aqua.  another plant was in front of a white fence and the fence is purple - it was white.   a picture of a waterfall was nice but the foliage wa a duller green and the rocks and water are purple (pretty but not right).    I don't know what i'm doing.    I've tried this in Photoshop Essentials 8 and other editing programs and it's always the same.    what can it do as i've never had this problem before. 

    What model of printer do you have? I am not familiar with a Photosmart Premium 320. Is this a small photo printer that is white, or a full size printer?
    007OHMSS
    I was a support engineer for HP.
    If the advice resolved the situation, please mark it as a solution. Thank you.

  • I udate my os to 10.6.7 and since then my Pages have color problems. The text is not visible (white on white background) it does'nt help to change the text color nor background color. Pls help

    I udate my os to 10.6.7 and since then my Pages have color problems. The text is not visible (white on white background) it does'nt help to change the text color nor background color. I just download the recent trail version of Iworks and install it. The first document I opened it was ok. When I open the second one the problem appear again and stayed. Pls help

    This behavior was described many times.
    In every occurrence,the operating system was an uncompleted one resulting of the use of Software Update to update the operating system to 10.6.2, 10.6.3, 10.6.4, 10.6.5, 10.6.6, 10.6.7.
    In such cases, the solace was to apply a combo updater.
    As you are using 10.6.7, download and apply the combo 10.6.7 :
    http://support.apple.com/kb/DL1361
    After that, run Software Update which will urge you to apply :
    Snow Leopard Font Update
    Yvan KOENIG (VALLAURIS, France) dimanche 29 mai 2011 21:15:58
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • JScrollPane scroll setting first column is not visible?

    Hi All,
    i am using jtable and jscrollpane. in this my first column of 70 pixal width and rest 125 pixal width.set focus is on 1 cell(1 row, 1 column) in table. but due to this scrollbar is slightly on right side whice coz first column not visible.(need to drag for visibility). i am trying to make it visible without dragging.
    how to do this? HELP.
    i tried with tableScroll.scrollRectToVisible(table.getCellRect(0,0,true )); & -1,-1
    but it didnt worked.
    Code is like this..........
    table = new JTable(64,65){
    table.setName("Table");
    ((DefaultTableModel)table.getModel()).setColumnIdentifiers(vectName.getColumnIdentifiers());
              for(int i = 0;i<table.getRowCount();i++) {
                   table.setValueAt((i+1)+"",i,0);
              table.setGridColor(Color.black);
              table.setSelectionBackground(new Color(125,255,144));
              table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
              table.setCellSelectionEnabled(true);          
              table.addKeyListener(listener);
              table.addMouseListener(listener);
              table.getSelectionModel().addListSelectionListener(this);
              table.getColumnModel().addColumnModelListener(this);
              table.getColumnModel().getColumn(0).setResizable(false);
              table.getColumnModel().getColumn(0).setMinWidth(70);
              table.getColumnModel().getColumn(0).setMaxWidth(70);
    JScrollPane tableScroll = new JScrollPane(table);
    Dimension minimumSize = new Dimension(100,25);
    tableScroll.setMinimumSize(minimumSize);          
    add(tableScroll);

    Hi weebib ,
    pls find some working code which shous my problame .
    you can see its coming to column 'B'. but i want it to show from column 'A' .
    sample working code : =
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.table.*;
    import java.util.*;
    public class myTable extends JFrame{
    JTable table;
    JScrollPane jsp;
    JPanel p1;
    int NO_OF_ROWS = 64;
    int NO_OF_COLUMNS = 65;
    Vector vColumnNames ;
    myTable(){
         Container con = getContentPane();
         p1 = new JPanel();
         table = new JTable(NO_OF_ROWS,NO_OF_COLUMNS){
              public boolean isCellEditable(int row, int column) {
                                  if(column == 0){
                                       return false;
                                  else{
                                       return true;
         setTableProperties();
         jsp = new JScrollPane(table);
         p1.add(jsp);
         con.add(p1);
         setSize(400,500);
         show();
         //System.out.println("Hello there");
    public Vector getColumnIdentifiers(){
         vColumnNames = new Vector();
                   for(int i=65;i<129;i++) {
                        vColumnNames.add(new String((char)i+""));// setting the alphabets for the column names //orig
         return vColumnNames ;
    public void setTableProperties(){
         ((DefaultTableModel)table.getModel()).setColumnIdentifiers(getColumnIdentifiers());
         for(int i = 0;i<table.getRowCount();i++) {
                        table.setValueAt((i+1)+"",i,0);// Set the names of the row
         table.setGridColor(Color.black);
         table.setSelectionBackground( Color.RED);
         table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         table.setCellSelectionEnabled(true);
         table.addMouseListener(new myMouseListener());
         table.addKeyListener(new myKeyListener());
    //     table.getColumnModel().getColumn(0).setPreferredWidth(125);
    //     table.getColumnModel().getColumn(0).setResizable(false);
    //     table.getColumnModel().getColumn(0).setMinWidth(70);
    //     table.getColumnModel().getColumn(0).setMaxWidth(70);
         for(int u =0 ;u<64;u++){
              if(u==0){
                   table.getColumnModel().getColumn(u).setPreferredWidth(70);
              else{
                   table.getColumnModel().getColumn(u).setPreferredWidth(200);
         table.changeSelection(0,1,false,false);
    static public void main(String[] args){
              myTable test = new myTable();
              test.addWindowListener(new WindowAdapter(){
                   public void windowClosing(WindowEvent e){System.exit(0);}
    public class myMouseListener extends MouseAdapter{
         public void mousePressed(MouseEvent me){
                   table.repaint();
    public class myKeyListener extends KeyAdapter{
         public void keyPressed(KeyEvent ke){
                   if(table.getSelectedColumn() == 0){
                        ke.consume();
    ================
    pls do reply back if i am doing something wrong.
    == Gavin

  • Components are not visible in the beginning..

    Hai ..
    The contents(TextFields Labels and Buttons) of my application are displayed only after i resize the frame manually.. Why is it so.. Is there any way to make them visible as soon as i run the application..
    This happens only for the first time(ie immediately after running the application..).. I guess its because of the Focus not being given to the Frame in the beginning(I may be wrong.. Correct me if i am wrong).. Any one with any solution??
    Thanks in advance!!

    /* This program is meant for opening the internet explorer on typing the search text in the TextField and pressing enter*/
    public Search()
    f=new Frame();
    maxwidth=Toolkit.getDefaultToolkit().getScreenSize().width;
    maxheight=Toolkit.getDefaultToolkit().getScreenSize().height;
    f.setBounds(maxwidth-200,0,200,maxheight);
    f.setVisible(true);
    f.setLayout(null);
    f.setBackground(Color.BLACK);
    f.setForeground(Color.RED);
    st=new JTextField();
    sl=new JLabel("Search");
    sl.setBounds(25,525,150,25);
    st.setBounds(25,565,150,25);
    sl.setForeground(Color.RED);
    f.add(sl);f.add(st);
    /* On pressing Enter i try to convert the contents in the textbox in a search string to be used in google*/
    st.addKeyListener(new KeyAdapter()
    public void keyPressed(KeyEvent ke)
    if(ke.getKeyCode()==KeyEvent.VK_ENTER)
    searchstring=st.getText();
    char ss[]=searchstring.toCharArray();
    for(int i=0;i<ss.length;i++)
    if(ss==' ')
    ss[i]='+';
    searchstring=new String(ss);
    try
    p=Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe www.google.co.in/search?hl=en&q="++searchstring++"&meta=");
    catch(Exception e1)
    System.out.println("Internet Explorer not found in C drive");
    try
    p=Runtime.getRuntime().exec("E:\\Program Files\\Internet Explorer\\iexplore.exe www.google.co.in/search?hl=en&q=+"+searchstring++"&meta=");
    catch(Exception e2)
    System.out.println("Internet Explorer not found in E drive");
    f.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent we)
    f.setVisible(false);
    /* This imgpanel is used to display an image in the JPanel*/
    imgpanel=new JPanel();
    imgpanel.setLayout(new GridLayout(1,1));
    f.add(imgpanel);
    imgpanel.setBounds(25,50,150,150);
    img=Toolkit.getDefaultToolkit().getImage("sample.jpg");
    img=img.getScaledInstance(150,150,Image.SCALE_SMOOTH);
    imgicon=new ImageIcon(img);
    imglabel=new JLabel(imgicon);
    imglabel.setVisible(false);
    imgpanel.add(imglabel);
    On executin the code i get the frame visible .. The JPanel is also visible but the image is not present.. Its visible once I resize the frame.. Also the TextField(for getting the search text)and the associated JLabels are sometimes not visible.. They are visible only if i bring some other window in front of it or if i resize the Frame..
    Thanks!!
    Edited by: s.baalajee on Jan 7, 2009 9:44 AM
    Edited by: s.baalajee on Jan 7, 2009 9:45 AM

  • Output not visible !

    Can you see why the BouncingBalls are not visible ?
    Something is wrong with the bounce() method in the BallDemo class
    I tried to pick it apart one line at a time. No compilation errors.
    Here is the bounce() method and the BallDemo class in which it resides and the BoungingBall class that defines the balls.
    Norman
    //bounce method
    public void bounce()
               int ground = 400;   // position of the ground line
               int numberOfBalls = 0;
               myCanvas.setVisible(true);
               ArrayList balls = new ArrayList();
               // draw the ground
               myCanvas.drawLine(50, ground, 550, ground);
               //ex 5.50 (a)
               System.out.println("Type in the number of balls you would like to see bouncing and hit enter");
                 numberOfBalls = input.readInt();
                 BouncingBall myBall;
              myBall =   new BouncingBall( 100,  0,  24,  Color.blue,
                                ground,  myCanvas);
                //(b)
                for(int i = 0; i < numberOfBalls; i++)
                  //(c) (d)
               Random rg = new Random(255);
                BouncingBall newBall =  new BouncingBall(i + 100, 0, 16, new Color(rg.nextInt(255),rg.nextInt(255),rg.nextInt(255)), ground, myCanvas);
                //add the ball to the ArrayList object
               balls.add(newBall);
              for(int i = 0; i < numberOfBalls; i++)
                     BouncingBall ball = (BouncingBall)balls.get(i);
                     ball.draw();
                 // make the balls bounce
                 boolean finished =  false;
                 while(!finished) {
                  myCanvas.wait(50);           // small delay
                  ball.move();
                   // stop once ball has travelled a certain distance on x axis
                   if(ball.getXPosition() >= 550 )
                       finished = true;
               }//move loop
                     ball.erase();
             }//for loop
           }//bounce method
    import java.awt.*;
    //(d)
    import java.awt.Color;
    import java.util.Random;
    import java.awt.geom.*;
    //ex5.50 (a)
    import java.util.*;
    import java.io.*;
    * Class BallDemo - provides two short demonstrations showing how to use the
    * Canvas class.
    //(a) Change the bounce() method in the BallDemo class to let the user
    //choose how many balls should be bouncing
    //(b) Use a collection to store the balls
    //(c) Place the balls in a row along the top of the canvas.
    public class BallDemo
        private Canvas myCanvas;
        FormattedInput input;
         * Create a BallDemo object. Creates a fresh canvas and makes it visible.
        public BallDemo()
            myCanvas = new Canvas("Ball Demo", 600, 500);
            input = new FormattedInput();
            myCanvas.setVisible(true);
         * This method demonstrates some of the drawing operations that are
         * available on a Canvas object.
        public void drawDemo()
            myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
            myCanvas.setForegroundColor(Color.red);
            myCanvas.setBackgroundColor(Color.yellow);
            myCanvas.drawString("We can draw text, ...", 20, 50);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.black);
            myCanvas.drawString("...draw lines...", 60, 70);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(200, 20, 300, 450);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(220, 100, 570, 260);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.green);
            myCanvas.drawLine(290, 10, 620, 220);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.white);
            myCanvas.drawString("...and shapes!", 110, 90);
        //    myCanvas.setForegroundColor(Color.red);
                    // the shape to draw and move
            int xPos = 10;
            Rectangle rect = new Rectangle(xPos, 150, 30, 20);
            // move the rectangle across the screen
            for(int i = 0; i < 600; i ++) {
                myCanvas.fill(rect);
                myCanvas.wait(10);
                myCanvas.erase(rect);
                xPos++;
                rect.setLocation(xPos, 150);
            // at the end of the move, draw once more so that it remains visible
            myCanvas.fill(rect);
           //ex 5.48
           public void drawFrame()
             Dimension myDimension =new Dimension( myCanvas.getSize());
             //Rectangle rectangle = new Rectangle(10,10,myDimension.width,  myDimension.height);
             //page 136
            Rectangle rectangle = new Rectangle(10,10,580,480);
             myCanvas.fill(rectangle);
             public void bounce()
               int ground = 400;   // position of the ground line
               int numberOfBalls = 0;
               myCanvas.setVisible(true);
               ArrayList balls = new ArrayList();
               // draw the ground
               myCanvas.drawLine(50, ground, 550, ground);
               //ex 5.50 (a)
               System.out.println("Type in the number of balls you would like to see bouncing and hit enter");
                 numberOfBalls = input.readInt();
                 BouncingBall myBall;
              myBall =   new BouncingBall( 100,  0,  24,  Color.blue,
                                ground,  myCanvas);
                //(b)
                for(int i = 0; i < numberOfBalls; i++)
                  //(c) (d)
               Random rg = new Random(255);
                BouncingBall newBall =  new BouncingBall(i + 100, 0, 16, new Color(rg.nextInt(255),rg.nextInt(255),rg.nextInt(255)), ground, myCanvas);
                //add the ball to the ArrayList object
               balls.add(newBall);
              for(int i = 0; i < numberOfBalls; i++)
                     BouncingBall ball = (BouncingBall)balls.get(i);
                     ball.draw();
                 // make the balls bounce
                 boolean finished =  false;
                 while(!finished) {
                  myCanvas.wait(50);           // small delay
                  ball.move();
                   // stop once ball has travelled a certain distance on x axis
                   if(ball.getXPosition() >= 550 )
                       finished = true;
               }//move loop
                     ball.erase();
             }//for loop
           }//bounce method
         }//endof class
    import java.awt.*;
    import java.awt.geom.*;
    * Class BouncingBall - a graphical ball that observes the effect of gravity. The ball
    * has the ability to move. Details of movement are determined by the ball itself. It
    * will fall downwards, accelerating with time due to the effect of gravity, and bounce
    * upward again when hitting the ground.
    * This movement can be initiated by repeated calls to the "move" method.
    * @version 1.1  (23-Jan-2002)
    public class BouncingBall
        private static final int gravity = 3;  // effect of gravity
        private int ballDegradation = 2;
        private Ellipse2D.Double circle;
        private Color color;
        private int diameter;
        private int xPosition;
        private int yPosition;
        private final int groundPosition;      // y position of ground
        private Canvas canvas;
        private int ySpeed = 1;                // initial downward speed
         * Constructor for objects of class BouncingBall
         * @param xPos  the horizontal coordinate of the ball
         * @param yPos  the vertical coordinate of the ball
         * @param ballDiameter  the diameter (in pixels) of the ball
         * @param ballColor  the color of the ball
         * @param groundPos  the position of the ground (where the wall will bounce)
         * @param drawingCanvas  the canvas to draw this ball on
        public BouncingBall(int xPos, int yPos, int ballDiameter, Color ballColor,
                            int groundPos, Canvas drawingCanvas)
            xPosition = xPos;
            yPosition = yPos;
            color = ballColor;
            diameter = ballDiameter;
            groundPosition = groundPos;
            canvas = drawingCanvas;
         * Draw this ball at its current position onto the canvas.
        public void draw()
            canvas.setForegroundColor(color);
            canvas.fillCircle(xPosition, yPosition, diameter);
         * Erase this ball at its current position.
        public void erase()
            canvas.eraseCircle(xPosition, yPosition, diameter);
         * Move this ball according to its position and speed and redraw.
        public void move()
            // remove from canvas at the current position
            erase();
            // compute new position
            ySpeed += gravity;
            yPosition += ySpeed;
            xPosition +=2;
            // check if it has hit the ground
            if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {
                yPosition = (int)(groundPosition - diameter);
                ySpeed = -ySpeed + ballDegradation;
            // draw again at new position
            draw();
         * return the horizontal position of this ball
        public int getXPosition()
            return xPosition;
         * return the vertical position of this ball
        public int getYPosition()
            return yPosition;
    }

    I don't even have to study your code - all I have to do is search the HTML on this screen and see there is no reference to run() or threads. You won't make squat move unless you use threads.

  • ImageIO: scaling and then saving to JPEG yields wrong colors

    Hi,
    when saving a scaled image to JPEG the colors are wrong (not just inverted) when viewing the file in an external viewer (e.g. Windows Image Viewer or The GIMP). Here's the example code:
    public class Main {
         public static void main(String[] args) {
              if (args.length < 2) {
                   System.out.println("Usage: app [input] [output]");
                   return;
              try {
                   BufferedImage image = ImageIO.read (new File(args[0]));
                   AffineTransform xform = new AffineTransform();
                   xform.scale(0.5, 0.5);
                   AffineTransformOp op = new AffineTransformOp (xform, AffineTransformOp.TYPE_BILINEAR);
                   BufferedImage out = op.filter(image,null);
                   ImageIO.write(out, "jpg", new File(args[1]));
    /* The following ImageViewer is a JComponent displaying
    the buffered image - commented out for simplicity */
                   ImageViewer imageViewer = new ImageViewer();
                   imageViewer.setImage (ImageIO.read (new File(args[1])));
                   imageViewer.setVisible (true);
              catch (Exception ex) {
                   ex.printStackTrace();
    Observations:
    * viewing this JPEG in an external viewer displays the colors wrong, blue becomes reddish, skin color becomes brown, blue becomes greenish etc.
    * when I skip the transformation and simply write the input 'image' instead the colors look perfect in an external viewer!
    BufferedImage image = ImageIO.read (new File(args[0]));
    ImageIO.write (image, "jpg", new File(args[1]));
    * when I do the scale transformation but store as PNG instead the image looks perfect in external viewers!
    BufferedImage out = op.filter(image,null);
    ImageIO.write(out, "png", new File(args[1]));
    * viewing the scaled JPEG image with The GIMP produces "more intense" (but still wrong) colors than when viewing with the Windows Image Viewer - I suspect that the JPEG doesn't produce plain RGB values when decompressed (another color space used then sRGB? double instead of int values?)
    * Loading the saved image and display it in a JComponent shows the image fine:
    class ViewComponent extends JComponent
         private Image image;
         protected void paintComponent( Graphics g )
              if ( image != null )
    // image looks okay!
                   g.drawImage( image, 0, 0, this );
         public void setImage( BufferedImage newImage )
              image = newImage;
              if ( image != null )
                   repaint();
    * Note that I've tried several input image formats (PNG, JPEG) and made sure that they were stored as RGB (not CMYK or the like).
    * Someone else already mentioned that the RGB values as read from an JPG image are wrong, but no answer in this thread - might be connected with this problem: http://forum.java.sun.com/thread.jspa?forumID=20&threadID=612542
    * I tried the jdk1.5.0_01 and jdk1.5.0_04 on Windows XP.
    Any suggestions? Is this a bug in the ImageIO jpeg plugin? What am I doing wrong? Better try something like JAI or JIMI? I'd rather not...
    Thanks a lot! Oliver
    p.s. also posted to comp.lang.java.programmers today...

    Try using TYPE_NEAREST_NEIGHBOR
    rather than
    TYPE_BILINEARI was a bit quick with saying that this doesn't work - I had extended my example code which made it fail (see later), but here's a working version first (note: I use the identity transform only for simplicity and to show that it really doesn't matter whether I scale, rotate or shear)):
    // works, but only for TYPE_NEAREST_NEIGHBOR interpolation
    Image image = ImageIO.read (new File(args[0]));
    AffineTransform xform = new AffineTransform();
    AffineTransformOp op = new AffineTransformOp (xform, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
    BufferedImage out = op.filter(image, null);
    ImageIO.write(out, "jpg", new File(args[1]));The problem: we restrict ourselves to nearest neighbor interpolation, which is especially visible when scaling up (or rotate, shear).
    Now when I change the following, it doesn't work anymore, the stored image has type=0 instead of 5 then (which obviously doens't work with external viewers):
    // doesn't work, since an extra alpha value is introduced, even
    // for TYPE_NEAREST_NEIGHBOR
    BufferedImage out = op.filter(image, op.createCompatibleDestImage(image, ColorModel.getRGBdefault()));Intuitively I would say that's exactly what I want, and RGB image with data type int (according to JavaDocs). That it has an alpha channel is a plus - or is it?
    I think this extra alpha value is the root of all evil: JPEG doesn't support alpha, but I guess ImageIO still mixes this alpha value somehow into the JPEG data stream - for ImageIO that's not a problem, the JPEG data is decompressed correctly (even though the alpha values have become meaningless then, haven't checked that), but other JPEG viewers can't manage this ARGB format.
    This also explains why writing to PNG worked, since PNG supports alpha channels.
    And obviously an AffineTransformOp silently changes the image format from RGB to ARGB, but only for TYPE_BILINEAR and TYPE_CUBIC, not for TYPE_NEAREST_NEIGHBOR! Even though I can imagine why this is done like this (it's more efficient to calculate with 32 bit ints than with 24 bit packed values, hence the extra alpha byte...) I would at least expect the JPEG writer to ignore this extra alpha value - at least with the default settings and unless otherwise told with extra parameters! Now my code gets unnecessary complicated.
    So how do I scale an image using bilinear (or even bicubic) interpolation, so that it get's displayed properly with external viewers? I found the following code working:
    // works, but I need an extra buffer and draw operation - UGLY
    // and UNNECESSARILY COMPLICATED (in my view)
    BufferedImage image = ImageIO.read (new File(args[0]));
    AffineTransform xform = new AffineTransform();
    AffineTransformOp op = new AffineTransformOp (xform, AffineTransformOp.TYPE_BILINEAR);
    BufferedImage out = op.filter(image, null);
    // create yet another buffer with the proper RGB pixel structure
    // (no alpha), draw transformed image 'out' into this buffer 'out2'          
    BufferedImage out2 = new BufferedImage (out.getWidth(), out.getHeight(),
                                                             BufferedImage.TYPE_INT_RGB);
    Graphics2D g = out2.createGraphics();
    g.drawRenderedImage(out, null);
    ImageIO.write(out2, "jpg", args[1]);This is already way more complicated than the initial code - left alone that I need to create an extra image buffer, just to get rid of the alpha channel and do an extra drawing.
    I've also tried to supply a BufferedImage as 2nd argument to the filter op to avoid the above:
    ICC_ColorSpace (iccColorSpace = new ICC_ColorSpace (ICC_Profile.getInstance(ColorSpace.CS_sRGB)
    BufferedImage out = op.filter(image, op.createCompatibleDestImage(image, new DirectColorModel (iccColorSpace), 24, 0xff0000, 0x00ff00, 0x0000ff, 0x000000, false, DataBuffer.TYPE_INT)));  But then the filter operation failed ("Unable to transform src image") and I was beaten by the sheer possibilities of color spaces, ICC profiles, so I quickly gave up... and hey, I "just" want to load, scale and save to JPG!
    The last option was getting a JPEG writer and its ImageWriteParam, trying to set the output image type:
    iwparam.setDestinationType(ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB));But again I failed, the resulting image type was still type=0 (and not 5). So I gave up, realising that the Java API is still overly complex and "too design-patterned" for simple tasks :(
    If anyone has still a good idea how to get rid of the alpha channel when writing to JPEG in a simple way (apart from creating an extra buffer as above, which works for me now...)... you're very welcome to enlighten me ;)
    Cheers, Oliver
    p.s. Jim, I will assign you the "DukeDollars", since your hint was somewhat correct :)

  • 3d line graph: Line not visible

    How come the line is only visible when the user click on the 3D graph?
    The attached VI load some data into the 3D graph but it's not visible.
    When the user click on the 3D graph, the line shows up
    From the moment the mouse button is released the line disappears
    What am I doing wrong??
    Thanks for your reaction!
    I'm using LV 8.6
    Attachments:
    Trial-3DLine-002.vi ‏39 KB

    Who programmed the CW 3D graph control???
    Since the Caption & Label properties didn’t act as expected, I connect a control to each of them to play with.
    This is what I found out:
    Caption color: doesn’t influence the graph at all
    Caption Opposite visible: Ok
    Caption visible: Ok
    Caption font size: doesn’t influence the graph at all
    Caption text: Ok
    Grid color: doesn’t influence the graph at all
    Grid visible: Ok
    Label Color: doesn’t influence the graph at all
    Label Opposite Visible: Ok
    Label Visible: Ok
    Label Font size: The size of the Caption is changed !!!!
    Tick Color: Ok
    Major Tick visible: Ok
    Minor tick visible: Ok
    Major tick count: Ok
    Minor tick count: Ok
    Range Autoscale: Ok
    Range maximum: Ok
    Range minimum: Ok
    I’m sorry but did I pay for that ?? ??
    Attachments:
    Trial-3DLine-004.vi ‏48 KB

  • Jbuttons are not visible

    Hi,
    Please Help.
    I have defined a Jpanel which contains some buttons. This panel is initially collapsed and there is an expand button, clicking on which will expand the panel and buttons should be visible.
    Sometimes the buttons are not visible after expanding the panel, or only some of them are visible.
    This problem is not reproducible everytime.
    For expanding and collapsing the Jpanel i am chaging the bound settings of the panel by using function
    setBounds().
    Can someone please help me with this issue?
    Thanks

    My intention was not to annoy anyone by posting my problem at two different forums. Sorry if i did that. I just wanted to get more opinions on this problem.
    The suggestions i received on this one was mainly to use 'Layout Manager'. I tried using that but was running into other issues. If i have to use Layout Manager then i guess i have to change the design of the full window. I cannot use layout manger on just the part of the window which is giving problem (please let me know i am wrong). Also, I am new to Swings and not much familiar with 'Layout Manager'.
    Is there a way to resolve this problem without using layout manager. This is not reproducible. It happens only in production.
    I am pasting my code below -
    I have modified the code as per the suggestions received from the forum to include repaint() and revalidate() methods.
    The part i added is in bold. Please let me know what changes i should do to improve this and resolve the issue.
    public static void main(String[] args) {
              initGUI();          
              frame = new JFrame();          
              frame.getContentPane().add(this);          
              frame.setBackground(LIGHT_BLUE);          
              frame.setTitle("ABC");
              logoImage = imgSPIcon.getImage();
              frame.setIconImage(logoImage);          
              frame.setSize(286,298);
              frame.setResizable(false);          
              frame.setVisible(false);  
                    frame.getContentPane().validate();  
                    frame.validate();     
    private void initGUI() {
              try {          
                   this.setSize(294, 280);
                   this.setBackground(LIGHT_BLUE);
                   this.setName("ABC");
                   getContentPane().setBackground(this.LIGHT_BLUE);
                   getContentPane().setLayout(null);               
                   this.setFocusable(false);
                   //collapse button used for expanding and collapsing the dial panel
                             m_btnCollapse = new JButton();
                             BottamPanel.add(m_btnCollapse);
                             m_btnCollapse.setBounds(163, 0, 112, 21);
                             m_btnCollapse.setIcon(imgExpandDialpad);
                             m_btnCollapse.setBorder(BorderFactory.createCompoundBorder(null, null));
                             m_btnCollapse.setBackground(new java.awt.Color(177, 201, 224));
                             m_btnCollapse.setContentAreaFilled(false);
                   //Dial panel
                        DialPanel = new JPanel();                    
                        //getContentPane().add(DialPanel);                    
                        DialPanel.setBounds(0, 251, 280, 0);                    
                        DialPanel.setLayout(null);
                        DialPanel.setBackground(bkColor);                    
                             m_btn1 = new JButton();                         
                             m_btn1.setIcon(imgDPOne);
                             m_btn1.setContentAreaFilled(false);
                             m_btn1.setBounds(79, 0, 35, 28);
                             m_btn1.setBorderPainted(false);
                             DialPanel.add(m_btn1);
                             m_btn2 = new JButton();                         
                             m_btn2.setBounds(120, 0, 35, 28);
                             m_btn2.setIcon(imgDPTwo);
                             m_btn2.setContentAreaFilled(false);
                             m_btn2.setBorderPainted(false);
                             DialPanel.add(m_btn2);
                             m_btn3 = new JButton();                         
                             m_btn3.setBounds(161, 0, 35, 28);
                             m_btn3.setIcon(imgDPThree);
                             m_btn3.setContentAreaFilled(false);
                             m_btn3.setBorderPainted(false);
                             DialPanel.add(m_btn3);
                        //includes more such buttons
                                    DialPanel.validate();
                        getContentPane().add(DialPanel);               
                   //adding mouse listner for the collapse button
                   JavaPhoneMouse aJavaPhoneMouse = new JavaPhoneMouse();
                   m_btnCollapse.addMouseListener(aJavaPhoneMouse);
         //mouse listner.
         class JavaPhoneMouse extends java.awt.event.MouseAdapter {
              public void mouseClicked(java.awt.event.MouseEvent event) {
                   Object object = event.getSource();
                   if (object == m_btnCollapse)
                        m_btnCollapse_MouseClicked(event);
         //On expanding the dial panel the dial panel is expanded(the size changes) but the buttons are invisible. 
         void m_btnCollapse_MouseClicked(java.awt.event.MouseEvent event) {
              //if the dial pad is in expanded form it will collapse else it will be expanded.
              if (isDialPadCollapsed == false) {               
                   DialPanel.setBounds(0, 251, 280, 0);
                   DialPanel.revalidate();
                   DialPanel.repaint();                              
                   BottamPanel.setBounds(0, 251, 280, 21);
                   m_btnCollapse.setIcon(imgExpandDialpad);               
                   this.setSize(280, 277);               
                   frame.setResizable(true);
                   frame.setSize(286, 298);
                   frame.setResizable(false);
                            frame.getContentPane().repaint();
                   frame.repaint();                              
                   isDialPadCollapsed = true;
              } else {               
                   this.setSize(280, 408);               
                   frame.setResizable(true);
                   frame.setSize(286, 430);
                   frame.setResizable(false);               
                   BottamPanel.setBounds(0, 384, 280, 21);               
                   DialPanel.setBounds(0, 251, 280, 133);     
                            DialPanel.revalidate();
                   DialPanel.repaint();
                   frame.getContentPane().repaint();
                   frame.repaint();          
                   m_btnCollapse.setIcon(imgCollDialpad);
                   isDialPadCollapsed = false;
    {code}
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Drop down boxes do not show up. My tabs are not visible. I could barely see the box to type in this question. Something is off. I deleted and reinstalled program it is still just floating words. I work on a Mac with ox 10.6.8

    The browser boxes, tabs, and links do not show up with the needed outlines, colors, and shapes. This box I am typing in was barely visible. Above this box is a set of two verticle parallel bars. When I moused over it, I saw it was for inserting a link, but if I had not been curious I would not have known what those lines were for. When I look at this page on PC I have a colored blue backdrop. It is not visible on the Mac. The search box does not have the image of the magnifying class and the arrow does not show up where it should be. The words Post Question just appear below the statement we have made some educated guesses about your browser. I thought maybe it had been a theme that was applied, but I do not see how it could have come on when I trashed the old version of the firefox.

    A;though the CSS is very well documented, there are those that ignore those signs. Look at the following
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: auto;
        float: left;
    The rest have been given a width of 15em, so this value may be a good start.
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
       width: auto;
        background-attachment: fixed;
    Just keep the border property and remove the other two.
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;
    The following is the original for the above
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;
    Cheers,
    Gramps

  • Eyedropper in PS CS6 picking wrong color

    My eyedropper started picking the wrong color!  I ahve reset and reinstalled PS - and still have this problem.  No matter what color I click the eyedropper on, it picks a shade darker than what I want.  Anyone have any ideas?  Like I said, I am running PS CS6 on OS Mountain Lion.

    hanci wrote:
    I also have problems with the eyedropper in RGB mode. I have a blue background color and when selecting it with the eyedropper I get #244f69 when I'm in RGB mode. And if I use that color in CSS on a website, the color gets darger than the original color in Photoshop. But if I change to CMYK mode and use the eyedropper again, then i get this code on the same background #00516a. And with that code I get the color I want on the website.
    Adobe Photoshop Version: 13.0 (13.0 20120315.r.428 2012/03/15:21:00:00) x64
    Am I doing something wrong?
    Apart from your Photoshop needing updated to at least 13.0.1, the problem may be that your RGB document, which you're sampling in Photoshop, does not have sRGB profile and/or your Web browser is not colour managed and/or your computer is not using a correctly calibrated monitor profile and/or something else.

  • Captivate 5.5 published files are not visible in Fire Fox or open in new window.

    When I publish and post Captivate 5.5, the HTML or the swf files do not display in Fire Fox (latest version) without forcing the file to open in a new window (if it displays at all). If it does work, the Flash security blocks the swf on an ugly view until the user clicks.
    I thought it was because I have to assign a direct URL to each component, but all of the other Captivate sites I have reviewed have the same issue when viewing in Fire Fox.
    IE will display after the active x is authorized (I can live with that).
    You Tube and other Flash display properly in Fire Fox, just not Captivate products.
    I have disabled off all plugins, modified the protected settings, and everything I could find listed in the Fire Fox help. I have installed a previous version of Flash and Shockwave Player. Short of reinstalling windows, it is not working and that will not help because the published content is not visible on any other machine in the office or at home.
    The files are in a Portal, so I cannot share them unless you are in the DoD and have an AKO or DKO account.
    However, here is another example of the Captivate not working.
    https://clc.dau.mil/games (this displays on some computers, but not all)
    http://www.hartisd.net/pages/uploaded_files/Assignment_Search.mht (After allowing the mht, this displays in IE)
    I am not sure if it has something to do with the other 2 published xml files that are not directly referenced in the html, but I just need either the swf or html to display in the iframe without forcing another window to display and without a lot of dependecy issues with other add-ons in Fire Fox.
    - Thanks!

    Any of the DAU games, if they display. It is a government site, so they have the standard gov garbage (stuff not working like certificates), but nothing is harmful nor can they do anything to track other than the current session.
    It is kind of weird how the content is displayed... It is not an intranet, it goes to a limited access portal. When I store content, it uses an absolute path instead of relative path. Very aggrevating when using many of the tools for non-programmers (like me), and probably more aggrevating for programmers.
    Whether I point directly to the .swf or to the generated HTML, the content displays in IE, but not in FF.
    It may be a combination of FF and Captivate. FF seems rather flaky in dealing with swf files. There is the consideration for add-ons, but I tried on a newly imaged computer and it still was not working. Even after going through all of the FF steps to get it to work.
    Basically we had to create a new HTML file to display the content because the Captivate published files don't work. However, the new HTML does not reference the XML files.
    When I publish, I get 5 different files, .swf, .htm, .js, and 2 .xml. When I dig through the code (once again, not a programmer, soo I may be missing something), even round tripping to Flash, I do not see how the .xml files are referenced at all.
    These may be different topics, not sure, it came up because I am trying to get a simple solution from the product that can be easily transferred to our production servers and available for Solders to access.
    - Thanks
    Michael

  • Wrong colors when printing to HP Colorlaser Jet 4550 PCL 5c

    I just upgraded from Labview 5.1.1 to Labview 6.1 on a Windows 95 Compaq Notebook. All the plot colors in 8 plot XY Graph indicator printed correctly on our network HP Colorlaser Jet 4550 PCL 5c using Labview 5.1.1. When I print the graph in Labview 6.1, sometimes some of the plot colors in the graph are wrong. In fact one of the plot switches color about 2/3 of the way across the X-axis. What is really weird is that the plot colors always print correctly in the legend. The VI prints the graph programically, but I also get the same inconsistent results when I copy the XY Graph to a new VI and use the print window comand in the file menu.
    In my Labview preferences I use standard printing with colors and di
    thering is turn on. The colors are correct when I programically save the front panel to either bmp, jpeg, or png files.
    What causing this strange behavior?

    Greg,
    Thanks for your suggestion; however, it did not solve the problem. I set the line thickest to the maximum. Then I tried with and without dithering. The results were still inconsistent. Sometimes I got the correct colors; othertimes, some plots had the wrong colors. I attached two gif files as examples. The first shows the correct colors. The second shows that the 1st plot is yellow instead of blue. Also the 4th plot is green instead of red for the 1st 80% of the plot. Then it switches to the correct color, red. I have other graphs with different plots with the wrong colors. Notice that the colors in the legend are always correct.
    Attachments:
    Good.gif ‏105 KB
    Bad.gif ‏108 KB

  • Data is visible in base tables of BOM routing but not visible in front end

    Hi,
    Through BOM_RTG_PUB API I am populating routing data into base tables, it is successfull.. but that data is not visible in front end when i queried from front end..
    i am getting error while i run API as......
    An error occured while processing business object BOM_ITEM12 in organization MMO. Please check the data in this business object and re-run the import process.
    Can any one help me in finding out what's wrong with this..
    Thanks in advance..
    Edited by: 875417 on Feb 6, 2012 10:49 PM

    Your obeservation is correct, and expected behavior.
    This behavior is useful when you have inputs that you would like to set as defaults for the user.
    Obviously, if there is a value to be saved, it will require some memory to store the value.
    If the input is left empty by default, that memory is made available again.
    It may not be easy to think of a good use for this for a graph, but think about for numeric or string controls.
    What if the user isnt sure how they should input a certain parameter or value?
    You could store a default value so they could see how they should input their value.
    Message Edited by Cory K on 09-15-2009 11:12 AM
    Cory K

  • Second Video not visible even after the first video is stopped

    Hi,
    I am trying to play a second video after the first video has completed(end of media). But the second video is not visible on the frame eventhough it plays in the background. I tried various things like stopping and closing the first video and removing all the components( visual and control). Still it does not work.
    p.stop();
                        p.close();
                        p.deallocate();
                        remove(p.getVisualComponent());
                        remove(p.getControlPanelComponent());
                        removeAll();Is this a problem with JMF or am I doing something wrong? Please help me out.

    Nidhi,
    What version of LabView and WMP are you using?
    This Knowledgebase points towards problems with LabView 7.1 and early and also WMP 9.0.
    Are you hearing sound when you play the video?  When you port the code over to the other application, are you including all necessary elements and preserving the link to the video?
    Rob K
    Measurements Mechanical Engineer (C-Series, USB X-Series)
    National Instruments
    CompactRIO Developers Guide
    CompactRIO Out of the Box Video

Maybe you are looking for