Need guidance in displaying graphics shapes on image

I would like some help drawing a circle over an image which is displayed in JScrollpane through JLabel, The goal is, whe we click over the image, the image apperas with a small circle in the place we have clicked. I have used JLabel for displaying image in JScrollpane by using imageLabel.setIcon(new ImageIcon("default.jpg"));
I need to draw circle/rectangle when i click on image by this i need to select different points in the image by drawing circles/rectangles over the image.
If you understand my problem than please guide me for the same.
Thank you

Don't post the same question multiple times. It's rude, as it leads to people wasting their time duplicating each others' answers.
http://forums.oracle.com/forums/message.jspa?messageID=9385315#9385315
http://forums.oracle.com/forums/message.jspa?messageID=9385314#9385314
Need guidance in displaying graphics shapes on image

Similar Messages

  • Need Help positioning a graphic over an image.

    Trying to position an arched graphic over an image in the header of this site.  The photoshop image provided shows the three separate components. 1. The white content is one image that houses the main header images and the other three images lower on the page. In CSS it is the #inner-content. 2. #main-content is the teal color  3.  The arch image, which sits inside #arch-container.  The CSS is shown here, but when it is displayed in a browser...the #inner-content sits below the arch image instead of up underneath it.  I have tried many variations within the CSS and can't find the solution. Help!
    @charset "utf-8";
        margin: 0px;
        padding: 0px;
    #page-wrap {
        width: 960px;
        margin-right: auto;
        margin-left: auto;
    #page-wrap #main-content {
        width: 960px;
        height: 1200px;
        background-color: #445d64;
        float: left;
    #page-wrap #main-content #inner-content {
        height: 1175px;
        width: 800px;
        background-image: url(images/inner-container-bg.jpg);
        float: left;
        margin-left: 80px;
        clear: both;
    #page-wrap #arch-container {
        width: 960px;
        height: 200px;
        z-index: 10;
        float: left;
        position: relative;
    #page-wrap #arch-container #arch-img {
        background-repeat: no-repeat;
        float: right;
        width: 960px;
        position: absolute;

    You need to bear with me a little more, age is rapidly setting in making it harder for me to understand what you are on about.
    Which code did I supply?
    Or do you mean the link?
    If you are referring to the link, I do not see a 170px gap from the top.
    Maybe someone more from this world would like to help you.
    Happy New Year!

  • Need guidance on new graphics card connectivity.

    Hey,
    I want to upgrade my current graphics card "ATI Radeon 4800 Series" to a newer more capable graphics card mainly for gaming. (Black Ops is coming out tomorrow and I feel it's time for an update)
    My current PC specification is as follows:
    Harddrive: 500GB
    RAM: 4GB
    CPU: Intel Pentium Dual Core 2.80GHz
    Motherboard: GF 7050V-M7
    PSU: 650W
    Graphics Card: ATI Radeon 4800 Series
    Operating System: Windows XP Service Pack 3
    I need your help to find me a new graphics card that it is compatible with my motherboard/other components at around £130!
    Thanks for your time!
    Hatton

    You need to re-read what I said... I said if he wanted to build a new computer based on a new motherboard, I did NOT say this would be a pop-in replacement for his existing motherboard
    There are several ASUS models, I picked the P6T SE since it had the right balance of features and price
    I have 6x2Gig ram sticks for 12Gig... if I was building today, now that prices are lower, I would start with 3x4Gig to leave room for adding 12Gig later
    I use the onboard sound and it works fine for my needs
    As well as an nVidia GTX285 (today, I would buy a GTX470) I have a Pinnacle Dv500 digitizing card, which I use via dual-boot with WinXP

  • How to display dynamically generated SVG image

    Hello, I need some help on this issue...
    I need my page to display programmatically generated SVG image. but if i directly pass SVG string to the page like <h:outputText value="#{MyBean.SVGresult}"/> it will pop up a download dialog box. what should i do to properly include my svg into the page by using embed tag??

    The h:graphicImage does not appear to handle svg; maybe it should be extended. I'm still looking for the best way to do it. I don't know if I have the right solution but here is what I have done so far. This will throw up a x, y polyline graph.
    Put a panelGrid as place holder in the jsp
          <h:panelGrid  title="Report" style="color=black" border="0" id="dataReports" columns="1" binding="#{dataAnalysis.dataReport}">
          </h:panelGrid>Then take a 'template' svg and fill it in with the dynamic additions and changes in the backing bean. In a submit action
                    generateSVGGraph(twothetaArray, intensityArray);
                    UIColumn c=new UIColumn();
                    HtmlOutputText op=new HtmlOutputText();
                    op.getAttributes().put("style","color=black");
                    op.setTitle("header text");
                    op.setValue("header text");
                    c.setHeader(op);
                    //c.getFacets().put()
                    //c.getChildren().add("<embed src=\"../phase.svg\" align=\"left\" width=\"500\" height=\"500\" type=\"image/svg+xml\"/>");
                    //javax.faces.webapp.UIComponentBodyTag embed=new javax.faces.webapp.UIComponentBodyTag();
                    //javax.servlet.jsp.tagext.TagAdapter;
                    com.hypernex.jsf.ext.html.HtmlEmbedGraphic embedGraphic=new com.hypernex.jsf.ext.html.HtmlEmbedGraphic();
                    //embedGraphic.
                    embedGraphic.getAttributes().put("src","../session/phase"+phaseGraphCount+".svg");
                    embedGraphic.getAttributes().put("align","left");
                    embedGraphic.getAttributes().put("width","600");
                    embedGraphic.getAttributes().put("height","500");
                    embedGraphic.getAttributes().put("type","image/svg+xml");
                    c.getChildren().add(embedGraphic);
                     dataReport.getChildren().add(c);
                   c=new UIColumn();
                    op=new HtmlOutputText();
                    op.getAttributes().put("style","color=black");
                    op.setTitle("header text");
                    op.setValue("header text");
                    c.setHeader(op);
                    HtmlOutputText out=new HtmlOutputText();
                    out.getAttributes().put("style","color=black");
                    //out.setTitle("Figure 1.  Powder intensity as dependent on 2&theta;.");
                    out.setValue("Figure "+phaseGraphCount+".  Powder intensity as dependent on 2Theta.");
                    c.getChildren().add(out);
                    dataReport.getChildren().add(c);
    ...generateSVGGraph
        protected void generateSVGGraph(double[] x, double[] y)
            //FacesContext context = FacesContext.getCurrentInstance();
            //context.
            //Create an svg graph of the equation.
            org.apache.batik.dom.svg.SAXSVGDocumentFactory svgFactory=new org.apache.batik.dom.svg.SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser");
               org.apache.batik.dom.svg.SVGDOMImplementation svgDOMImplementation=new org.apache.batik.dom.svg.SVGDOMImplementation();
            org.w3c.dom.DocumentType dt=null;//svgDOMImplementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN",f.toURI().toString());
            //System.out.println(dt);
         org.w3c.dom.svg.SVGDocument svgOMDocument=null;
            try
                System.out.println("dir "+(new java.io.File(".")).toURI().toString());
                svgOMDocument=(org.w3c.dom.svg.SVGDocument)svgFactory.createDocument((new java.io.File("../webapps/jsf-wita/siteadmin/templates/graph-template.svg")).toURI().toString(), new java.io.FileInputStream(new java.io.File("../webapps/jsf-wita/siteadmin/templates/graph-template.svg")));//new org.apache.batik.dom.svg.SVGOMDocument(dt, (org.w3c.dom.DOMImplementation)svgDOMImplementation);
                org.w3c.dom.svg.SVGSVGElement root=svgOMDocument.getRootElement();
                        org.apache.batik.dom.svg.SVGOMGElement primary_g=new org.apache.batik.dom.svg.SVGOMGElement("", (org.apache.batik.dom.AbstractDocument)svgOMDocument);
                        primary_g.setAttribute("style","stroke:black; fill:none; stroke-width:1");
                        root.appendChild(primary_g);
                        //double[] x=new double[4*90];
                        //double[] y=new double[x.length];
                        //x[0]=(double)(1)/4.0;
                            //methodArgs[0]=new Double(Math.toRadians(x[0]));
                        //y[0]=((Double)method.invoke(mathmlObject, methodArgs)).doubleValue();
                        double xMin=x[0];
                        double yMin=y[0];
                        double xMax=x[x.length-1];
                        double yMax=xMax;
                        double xOfyMax=yMin;
                        StringBuffer points=new StringBuffer();
                        for(int index=0;index<x.length-1;index++)
                            //System.out.println(x[index]+" "+y[index]);
                            //x[index]=(double)(index+1)/4.0;
                            //methodArgs[0]=new Double(Math.toRadians(x[index]));
                            //y[index]=((Double)method.invoke(mathmlObject, methodArgs)).doubleValue();
                            double cx=x[index];
                            double cy=y[index];
                            //if(xMin>cx)xMin=cx;
                            if(yMin>cy)yMin=cy;
                            //if(xMax<cx)xMax=cx;
                            if(yMax<cy)
                             xOfyMax=cx;
                             yMax=cy;
                        org.w3c.dom.svg.SVGTextElement xLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("xLabel");
                        xLabel.getFirstChild().setNodeValue("2?");//?");
                        org.w3c.dom.svg.SVGTextElement xMinimumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("xMinimumLabel");
                        xMinimumLabel.getFirstChild().setNodeValue(ddf.format(xMin,4).toString());
                        org.w3c.dom.svg.SVGTextElement xMaximumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("xMaximumLabel");
                        xMaximumLabel.getFirstChild().setNodeValue(ddf.format(xMax,4).toString());
                        org.w3c.dom.svg.SVGTextElement yMinimumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("yMinimumLabel");
                        yMinimumLabel.getFirstChild().setNodeValue(ddf.format(yMin,4).toString());
                        org.w3c.dom.svg.SVGTextElement yMaximumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("yMaximumLabel");
                        yMaximumLabel.getFirstChild().setNodeValue(ddf.format(yMax,4).toString());
                        for(int index=0;index<x.length-1;index++)
                            points.append((x[index]-xMin)*500/(xMax-xMin));
                            points.append(",");
                            points.append((y[index]-yMin)*500/(yMax-yMin));
                            points.append(" ");
                        //System.out.println(points);
                        org.apache.batik.dom.svg.SVGOMGElement g=new org.apache.batik.dom.svg.SVGOMGElement("", (org.apache.batik.dom.AbstractDocument)svgOMDocument);
                        g.setAttribute("id",(String)"data");
                        g.setAttribute("transform", "translate(100, 550)");
                        g.setAttribute("style","stroke:black; fill:none; stroke-width:1");
                        org.apache.batik.dom.svg.SVGOMPolylineElement polyLine=new org.apache.batik.dom.svg.SVGOMPolylineElement("", (org.apache.batik.dom.AbstractDocument)svgOMDocument);
                        polyLine.setAttribute("fill", "none");
                        polyLine.setAttribute("stroke", "blue");
                        polyLine.setAttribute("transform", "scale(1, -1)");
                        polyLine.setAttribute("stroke-width", "1");
                        polyLine.setAttribute("points", points.toString());
                        g.appendChild(polyLine);
                        primary_g.appendChild(g);
                       javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance();
                       javax.xml.transform.Transformer intermediateTransformer=tFactory.newTransformer(new javax.xml.transform.stream.StreamSource("../webapps/jsf-wita/stylesheets/identity.xsl"));
                                    intermediateTransformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
                                    intermediateTransformer.setOutputProperty(OutputKeys.INDENT, "yes");
                         intermediateTransformer.transform(new javax.xml.transform.dom.DOMSource(svgOMDocument), new javax.xml.transform.stream.StreamResult(new java.io.FileOutputStream("../webapps/jsf-wita/session/phase"+phaseGraphCount+".svg")));
            catch(javax.xml.transform.TransformerConfigurationException tce)
                System.out.println("tce err: "+tce.getMessage());
            catch(javax.xml.transform.TransformerException te)
                System.out.println("te err: "+te.getMessage());
            catch(java.io.FileNotFoundException fnfe)
                System.out.println("fnfe:"+fnfe.getMessage());
            catch(java.io.IOException ioe)
                System.out.println("io:"+ioe.getMessage());
        HtmlEmbedGraphic.java
    * HtmlEmbedGraphic.java
    * Created on May 16, 2004, 8:12 AM
    package com.hypernex.jsf.ext.html;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    * @author  hyperdev
    public class HtmlEmbedGraphic extends javax.faces.component.UIComponentBase
        /** Creates a new instance of HtmlEmbedGraphic */
        public HtmlEmbedGraphic()
            super();
        public String getFamily()
            return "javax.faces.Data";
        public boolean isRendered()
            return true;
    public void encodeBegin(FacesContext context,
      UIComponent component) throws java.io.IOException {
      if ((context == null) || (component == null)){
          System.out.println("encodeBegin NullPointerException "+context);
        throw new NullPointerException();
          System.out.println("encodeBegin "+context+" "+component);
      //MapComponent map=(MapComponent) component;
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement("embed", this);
      writer.writeAttribute("src", getAttributes().get("src"),"id");
    public void encodeEnd(FacesContext context) throws java.io.IOException {
      if ((context == null)){
        throw new NullPointerException();
      //MapComponent map = (MapComponent) component;
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement("embed", this);
      writer.writeAttribute("src", getAttributes().get("src"),"id");
      writer.writeAttribute("align", getAttributes().get("align"),"id");
      writer.writeAttribute("width", getAttributes().get("width"),"id");
      writer.writeAttribute("height", getAttributes().get("height"),"id");
      writer.writeAttribute("type", getAttributes().get("type"),"id");
      writer.endElement("embed");
    }graph-template.svg - More static parts of the graphic can be put in here.
    <?xml version="1.0" encoding="UTF-8"?>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="text/ecmascript" width="100%" zoomAndPan="magnify" contentStyleType="text/css" viewBox="0 0 600% 600%" height="100%" preserveAspectRatio="xMidYMid meet" version="1.0">
    <g style="stroke:black; fill:none; stroke-width:1">
    <g id="visuals" style="stroke:black; fill:none; stroke-width:1" transform="translate(100, 550)">
    <rect id="box" transform="scale(1, -1)" x="1" y="1" width="500" height="500" fill="none" stroke="black" stroke-width="1.5"/>
    <g id="labels" transform="scale(1, 1)">
    <text id="xLabel" x="250" y="50" text-anchor="middle"
            font-family="Verdana" font-size="24" fill="blue" >x label</text>
    <text id="xMinimumLabel" x="0" y="20" text-anchor="middle"
            font-family="Verdana" font-size="18" fill="blue" >0.0</text>
    <text id="xMaximumLabel" x="500" y="20" text-anchor="middle"
            font-family="Verdana" font-size="18" fill="blue" >100.0</text>
    <text id="yMinimumLabel" x="-3" y="-3" text-anchor="end"
            font-family="Verdana" font-size="18" fill="blue" >0.0</text>
    <text id="yMaximumLabel" x="-3" y="-500" text-anchor="end"
            font-family="Verdana" font-size="18" fill="blue" >100.0</text>
    </g>
    </g>
    <g id="data" style="stroke:black; fill:none; stroke-width:1" transform="translate(10, 550)">
    </g>
    </g>
    </svg>

  • Need guidance to solve the problem.

    my internal hard drive is not showing up on mac. need guidance to solve the problem. thanks

    Hi,
    First make the finder the Front app.
    The Finder Menu > Preferences > General Section should have the Hard Drive item ticked to show the Hard Drive on the Desktop.
    The Name of the drive should not have a . at the beginng  as in .Mactinosh HD as this will make te file Invisible.
    There are also other characters that cause this.
    If you go to the Finder > Go Menu and select My Computer it should have opened a window displaying the Volumes ( Hard Drives and storage devices) that are connected.
    10:17 PM      Sunday; April 14, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • I have a MacAir, mid 2011 model, and want to view video on my TV.  I see that I need a mini display port to Hdmi but there are many of these.  What exatly do I need and how does one view a movie downloaded to the MacAir on a TV screen?

    I have a MacAir, mid 2011 model, and want to view video on my TV.  I see that I need a mini display port to Hdmi but there are many of these.  What exatly do I need and how does one go about viewing a movie downloaded to the MacAir on a TV screen?

    Welcome to Apple Support Communities
    That's exactly what you need. A Mini DisplayPort to HDMI adapter and a HDMI cable. See > http://support.apple.com/kb/HT4241?viewlocale=en_US
    This is the only way to view a video on the TV. After connecting your MacBook Air to the TV, image on your TV should show immediately. Then, press Command and F1 keys to mirror your MacBook Air display, and open the video

  • Display an object of Image type or Byte Array

    Hi, lets say i got an image stored in the Image format or byte[]. How can i make it display the image on the screen by taking the values in byte array or Image field?

    Thanks rahul,
    The thing is, i am generating a chart in a servlet
    and setting the image in the form of a byte [] to the
    view bean ( which is binded to the jsp, springs
    framework ). The servlet would return the view bean
    to the jsp and in the jsp, i am suppose to print this
    byte array so as to give me the image..
    I hope this makes sense.. pls help me ou!Well letme see if i got tht right or not,
    you are trying to call Your MODEL (Business layer / Spring Container) from a servlet and you are expressing that logic in form of chart (Image) and trying to save it as a byte array in a view bean and you want to print /display that as an image in a jsp (After Servlet fwd / redirect action) which includes other data using a ViewBean.
    If this is the case...
    As the forwaded JSP can include both image and Textual (hypertext too)..we can try a work around hear...Lets dedicate a Servlet which retreives byte [] from a view bean and gives us an image output. hear is an example and this could be a way.
    Prior to that i'm trying to make few assumptions here....
    1).The chart image which we are trying to express would of format JPEG.
    2).we are trying to take help of<img> tag to display the image from the image generating servlet.
    here is my approach....
    ViewBean.java:
    ============
    public class ViewBean implements serializable{
    byte piechart[];
    byte barchart[];
    byte chart3D[];
    public ViewBean(){
    public byte[] getPieChart(){
    return(this.piechart);
    public byte[] getBarChart(){
    return(this.barchart);
    public byte[] get3DChart(){
    return(this.chart3D);
    public void setPieChart(byte piechart[]){
    this.piechart = piechart;
    public void setBarChart(byte barchart[]){
    this.barchart = barchart;
    public void set3DChart(byte chart3D[]){
    this.chart3D = chart3D;
    }ControllerServlet.java:
    =================
    (This could also be an ActionClass(Ref Struts) a Backing Bean(Ref JSF) or anything which stays at the Controller Layer)
    public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException{
    /* There are few different implementations of getting   BeanFactory Resource
    In,the below example i have used XmlBeanFactory Object to create an instance of (Spring) BeanFactory */
    BeanFactory factory =
    new XmlBeanFactory(new FileInputStream("SpringResource.xml"));
    //write a Util Logic in your Implementation class using JFreeChart (or some open source chart library) and express the images by returning a  byte[]
    ChartService chartService =
    (GreetingService) factory.getBean("chartService");
    ViewBean vb = new ViewBean();
    vb.setPieChart(chartService.generatePieChart(request.getParameter("<someparam>"));
    vb.setBarChart(chartService.generateBarChart(request.getParameter("<someparam1>"));
    vb.set3DChart(chartService.generate3DChart(request.getParameter("<someparam2>"));
    chartService = null;
    HttpSession session = request.getSession(false);
    session.setAttribute("ViewBean",vb);
    response.sendRedirect("jsp/DisplayReports.jsp");
    }DisplayReports.jsp :
    ================
    <%@ page language="java" %>
    <html>
    <head>
    <title>reports</title>
    </head>
    <body>
    <h1 align="center">Pie Chart </h1>
    <center><img src="ImageServlet?req=1" /></center>
    <h1 align="center">Bar Chart </h1>
    <center><img src="ImageServlet?req=2" /></center>
    <h1 align="center">3D Chart</h1>
    <center><img src="ImageServlet?req=3" /></center>
    </body>
    </html>ImageServlet.java
    ==============
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
           byte buffer[];
            HttpSession session = request.getSession(false);
            ViewBean vb = (ViewBean) session.getAttribute("ViewBean");
            String req = request.getParameter("req");
            if(req.equals("1") == true)       
                buffer = vb.getPieChart();
            else if(req.equals("2") == true)
                 buffer = vb.getBarChart();
            else if(req.equals("3") == true)
                 buffer = vb.get3DChart();
            JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new ByteArrayInputStream(buffer));
            BufferedImage image =decoder.decodeAsBufferedImage() ;
            response.setContentType("image/jpeg");
            // Send back image
            ServletOutputStream sos = response.getOutputStream();
            JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
            encoder.encode(image);
        }Note: Through ImageServlet is a Servlet i would categorise it under presentation layer rather to be a part of Controller and added to it all this could be easily relaced by a reporting(BI) server like JasperServer,Pentaho,Actuate................
    Hope the stated implementation had given some idea to you....
    However,If you want to further look into similar implementations take a look at
    http://www.swiftchart.com/exampleapp.htm#e5
    which i believe to be a wonderful tutor for such implementations...
    However, there are many simple (Open) solutions to the stated problem.. if you are Using MyFaces along with spring... i would recommend usage of JSF Chart Tag which is very simple to use all it requires need is to write a chart Object generating methos inside our backing bean.
    For further reference have a look at the below links
    http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the
    http://jsf-comp.sourceforge.net/components/chartcreator/index.html
    NOTE:I've tried it personally using MyFaces it was working gr8 but i had a hardtime on deploying my appln on a Portal Server(Liferay).If you find a workaround i'd be glad to know about it.
    & there are many BI Open Source Server Appls that can take care of this work too.(Maintainace wud be a tough ask when we go for this)
    For, the design perspective had i've been ur PM i wud have choose BI Server if it was corporate web appln on which we work on.
    Hope this might be of some help :)
    REGARDS,
    RaHuL

  • Need my 30" display  to be 25ft away from our G5

    Need my 30" display to be 25ft away from our G5 I'm not finding many solutions on how I can do this and still retain a high quality image. Do i need some sort of repeater? Not getting any answers from stores around here. Help!!!!

    http://www.ramelectronics.net/html/DVIdlcables.html

  • How can I use IMGPLOT to display a 12-bit image in false color?

    I want to use IMGPLOT to display a 12-bit image in false color employing VC++ 7.0 . Actually it is stilla grey level. The only difference is to customize a new palette. I guess Ni should have a API for me change the palette. I donot want to convert my image into color image since its processing speed is slow.
    Any people has the silimar experience to do this?
    Thanks a lot in advance!
    zmt

    Hi Bruce Ammons,
    Thank you very much for your answer. I still need your clear instruction.
    I can directly display 12 bit image in 256 grey level just using IMGPLOT function without any mapping operation. That is because IMGPLOT directly supports to draw a 12 bit image through IMGPLOT_MONO_12 flag.
    IMGPLOT prototype is imgPlot(GUIHNDL window, void* buffer, uInt32 leftBufOffset, uInt32 topBufOffset, uInt32 xsize, uInt32 ysize, uInt32 xpos, uInt32 ypos, uInt32 flags=IMGPLOT_MONO_12 ).
    Hence I just need a C++ function to change the palette. I believe that IMGPLOT automatically does the 12bit to 8 bit mapping for me. What I need to do is just to change the palette. The question is which NI'S API can change the palette and work well with IMGPLOT. Or I have
    to use IMGPLOTDC and change the palette in the selected DC by myself.
    Your great help is much appreicated!
    zmt

  • Need several forms to show the same image from an image library

    Hi
    I have several InfoPath forms with a logo at the top of the form. I would like to have the logo linked to an image file so if I have to change the logo, I can just overwrite the file that's sitting in a SharePoint image library without having to edit and
    re-publish 30 forms.
    I can get the file placed in the InfoPath form, but when I publish the form, the image looks correct but the publish process embeds the image. If I view the properties of the image on the form in SharePoint, the URL isn't the URL to the image in the image
    library. It's a long URL that looks hashed.
    So I went back to InfoPath and tried Insert > Picture > pasted the URL to the image in the image library > then clicked the down-arrow on the Insert button and chose Link to File. Now when I publish it, I get an error that says:
    Linked images are not supported by InfoPath Forms Services. To fix this problem, make the image a part of the form template. (Then it has a link to the image from the image library.)
    Is it possible to link to an image file so if the image file is updated the forms will see the new image?
    Thanks in advance,
    Sonya

    Thanks for the reply. So if I understand the info on the links above, to simply display an image that's not embedded in my InfoPath form, I have to create a Rich Text Box in the form, add a Receive data connection to a Picture Library on SharePoint, add
    a Loading Event to the InfoPath form template and edit/paste C# code (because I only want to display one image from the image library and not a repeating table like the example in the article above), then edit and add more blocks of C# code to an "addImageToTable"
    function, save/build/publish the form, then perform an "administrator-approved form template deployment" on the server? lol, all of that seems excessive just to display a non-embedded image. I'll need to decide if I want to fool with that since the logos don't
    change very often.

  • How to display graphic flush left in WebHelp

    In my WebHelp home page, I have a banner across the top which
    is a gif image. Ideally I'd like it to display across the full
    width of the page and flush to the left margin.
    I'm using the syntax <body TOPMARGIN=0 LEFTMARGIN=0
    MARGINHEIGHT=0 MARGINWIDTH=0>. This displays fine, ie. flush to
    the left, in the RoboHelp viewer (Ctrl+W) but when the project is
    generated, there is a gap to the left of the image when the page is
    viewed.
    Anyone know any workarounds? It's a cosmetic thing, but would
    be nice to resolve.

    Try this:
    REPORT z_ooalv_logo.
    ****DECLARATION FOR LOGO INSERT
    CONSTANTS: cntl_true TYPE i VALUE 1,
    cntl_false TYPE i VALUE 0.
    DATA:h_picture TYPE REF TO cl_gui_picture,
    h_pic_container TYPE REF TO cl_gui_custom_container.
    DATA: graphic_url(255),
    graphic_refresh(1),
    g_result LIKE cntl_true.
    DATA: BEGIN OF graphic_table OCCURS 0,
    line(255) TYPE x,
    END OF graphic_table.
    DATA: graphic_size TYPE i.
    CALL SCREEN 100.
    &amp;----
    *& Module PICTURE OUTPUT
    text
    MODULE picture OUTPUT.
    DATA: l_graphic_xstr TYPE xstring,
    l_graphic_conv TYPE i,
    l_graphic_offs TYPE i.
    CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    EXPORTING
    p_object = 'GRAPHICS'
    p_name = 'EDS'"IMAGE NAME - Image name from SE78
    p_id = 'BMAP'
    p_btype = 'BCOL'
    RECEIVING
    p_bmp = l_graphic_xstr
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    graphic_size = XSTRLEN( l_graphic_xstr ).
    CHECK graphic_size > 0.
    l_graphic_conv = graphic_size.
    l_graphic_offs = 0.
    WHILE l_graphic_conv > 255.
    graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
    APPEND graphic_table.
    l_graphic_offs = l_graphic_offs + 255.
    l_graphic_conv = l_graphic_conv - 255.
    ENDWHILE.
    graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
    APPEND graphic_table.
    CALL FUNCTION 'DP_CREATE_URL'
    EXPORTING
    type = 'image'
    subtype = cndp_sap_tab_unknown " 'X-UNKNOWN'
    size = graphic_size
    lifetime = cndp_lifetime_transaction "'T'
    TABLES
    data = graphic_table
    CHANGING
    url = graphic_url
    EXCEPTIONS
    dp_invalid_parameter = 1
    dp_error_put_table = 2
    dp_error_general = 3
    OTHERS = 4 .
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    EXIT.
    ENDIF.
    CREATE OBJECT h_pic_container
    EXPORTING container_name = 'LOGO'.
    CREATE OBJECT h_picture EXPORTING parent = h_pic_container.
    CALL METHOD h_picture->load_picture_from_url
    EXPORTING
    url = graphic_url
    IMPORTING
    RESULT = g_result.
    ENDMODULE. " PICTURE OUTPUT

  • Displaying multi page tiff images

    Hi there
    I need to display a multipage tiff image, such that I can scroll through the different pages n the tiff file. I am new to ni vision and hence your inputs would be very helpful.

    Take a look at this thread.  You'll need to download the libtiff DLL here. 
    I managed to get it working in about 5 minutes, and could load a
    multi-page tiff into an array, and then split it into multiple Images.  The code is not the nicest, but it'll do the basics.  Alternatively you could try getting the .NET version of libtiff and calling it directly.
    Cheers ~ Greg
    Message Edited by GregS on 10-08-2009 03:36 PM

  • My start up disk Macintosh HD is full on my McAir OSX 10.9.4 memory 4GB. I need to clear the disk so that I can update it with the new software IOS 10.9.5 requiring 2.05GB. Need guidance on how to clear space.

    My start up disk Macintosh HD is full on my McAir OSX 10.9.4 memory 4GB. I need to clear the disk so that I can update it with the new software IOS 10.9.5 requiring 2.05GB. Need guidance on how to clear space.

    For information about the Other category in the Storage display, see this support article. If the Storage display seems to be inaccurate, try rebuilding the Spotlight index.
    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
              iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then restart the computer. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation—not the mythical 10%, 15%, or any other percentage. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    When Time Machine backs up a portable Mac, some of the free space will be used to make local snapshots, which are backup copies of recently deleted files. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as  Backups. The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself. If you followed bad advice to disable local snapshots by running a shell command, you may have ended up with a lot of data in the Other category. Ask for instructions in that case.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) or GrandPerspective (GP) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one. Note that ODS only works with OS X 10.8 or later. If you're running an older OS version, use GP.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS or GP can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install the app you downloaded in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the corresponding line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    sudo /Applications/GrandPerspective.app/Contents/MacOS/GrandPerspective
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Ignore any other messages that appear in the Terminal window.
    The application window will open, eventually showing all files in all folders, sorted by size. It may take a few minutes for the app to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with the app, quit it and also quit Terminal.

  • Safari 7 not displaying graphics

    I loaded Mavericks a few days ago and have nothing but problems with Safari; it won't display graphics, and as another problem (probably unrelated) won't download help files.

    Just found the problem - had inadvertently checked the Disable Images in Develop tab

  • Treat JPEG files next to raw files as seperate files still imports and displays them as seperate images

    Hi, I am taking RAW + JPEG files on a Nikon D810. The RAW files are saving to a CF (primary slot) and JPEGs to an Eye-Fi card (secondry slot). When I am importing into Lightroom 5 directly from the camera, even though I have 'Treat JPEG files next to raw files as seperate files' UNchecked in preferences, it still imports and displays them as seperate images. I am trying to import the JPEG as a sidecar file only to the RAW file as I have read about but this is not happening, any ideas why? Thanks

    Well in Lightroom they are apart from each other before the actual import, all the JPGs list first then all the NEF files next. The same actual photo as the NEF or as the JPEG both have the same file name apart from the .JPG or .NEF so that is not the problem. The NEFs go to the CF card and the JPGs go to the EyeFi SD card, I think you are onto the issue but I'm not sure what I need to do to fix it. I guess I need to change a setting on the D810 itself. There really doesn't seem to be any other settings apart from the RAW + JPEG vs only one or the other and allocating which card is primary for the RAWs and which card is secondry for the JPEGs. I really need the JPEGs to go to the EyeFi SD (secondary) for live iPad image viewing and not to the same primary card (CF) as the NEFs (RAWs) go. This does seem to be a typical setup so I would think it has been encountered before.
    Thanks for your help any other advise is appreciated.

Maybe you are looking for

  • Is there something wrong with my directory server replica?

    Yesterday I spun up a replica of my OD Master which I had just rebuilt clean from scratch.  Everything SEEMS fine, but the GUI reports a status I did not expect: As you can see, the master has its own IP listed twice, and there are 3 IP's for the rep

  • File to Mail without Mapping

    Hi Experts, I need to pick up text files from a folder using File Adapter and then send them to a mail id directly without any mapping in XI. Please suggest how it can be done. Thanks, Shobhit

  • How can i duplicate records from a flat file to a cube

    Hi all, i got the next problem, i m loading a flat file, fur example: Material KF1 KF2 A 10 12 B 25 30 01 02 I Need duplicate the records for material A and B but with the values of Not assign, in other words the result in the cube would be like this

  • Software Restriction Policy not allowing Program Files directory on 64-bit machines

    I've created a new software restriction policy, my default security level is set to "Disallowed", I have the standard built-in allowed locations: %HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRoot% %HKEY_LOCAL_MACHINE\SOFTWAR

  • Cannot access the external HDD PX1396E

    Just bought this external hard drive, 1TB. I plug it in and Windows (xp) recognizes it and installs the drivers, or something. When I click on it to explore it, it says please insert disk into drive X. I've connected it to 3 different computers and s