JPEG image of a chart created while visible property is false has no plots shown

Hi
I have a chart which I control the visible property while it is plotting data. This works fine until I want to create a jpeg image of the chart when the visible propert is fasle and all I get is a chart without any plots.
Any way around this?
Thanks in advance

Being a newbie my and 1 week into LabView still getting to knoiw the ins and outs of the thing.
Well to ellaborate:
I have a chart which needs to be only visible when the user presses a 'view' button. When pressed this changes the visible property to true and the chart is displayed with the correct plots. Problem is theat when the user clicks a 'stop' button I save the chart to a jpeg (the user does not want to see the chart at this point) . This does work when the chart is visible all the time and out of view. The only crude way I have managed to get it to work so far is by changing to screen position of the chart and making in visible when the stop is pressed and moving it to the visible screen when view is pressed. See my crude solution attached:
Message Edited by neergh on 09-20-2007 06:23 AM
Attachments:
VI test.vi ‏103 KB

Similar Messages

  • Saving chart images when visible property is false

    I've got an application where I chart several variables while the test is running.  In the process, I turn the chart visible properties to false so I can display a large summary x-y graph.  I want to save all the charts and the summary graph as jpgs, but not until later when I pass the references to the charts/graph (and gads of other stuff) to a handy data reduction subVI.  Using this sequence of events, the currently non-visible charts are all saved blank.  As always an example is easier to demonstrate what's going on than words, attached is a micro-version of what I want to do with these plots.  Is there any decent way to get these saved without a massive overhaul? 
    Thanks, Jesse
    Attachments:
    misc tinker 2.vi ‏105 KB

    I am new to this forum but used labview way back to 4.1 version. Anyway here is a modified version of your code, it seemed to work except there is a split second of switching back and forth of the first two plots but it is fairly fast enough though.
    Attachments:
    serialplotcapture.vi ‏122 KB

  • Visible Property to False

    Hi,
    I have to display set of items of block B1 and then hide items of block B2 and display set of items of Block B2 and hide items of block B1 based on the user selection.
    My clarification is that is there any possibility to set the property of the block as visisble to false so that all items belonging that block can be invisible.
    This would reduce writing lot of code..since the block contains more than 50 text box items and many check box.
    Also I need to avoid using stacked canvas.
    Thanks in advance

    the trick is the stacked canvas. else you have to create a generic routine, which goes through all of the items of your block

  • Non-Script Way of Setting Visible Property

    Why hello there!
    I am looking to set the "visible" property of a movie clip in
    the Flash CS3 designer, as opposed to using AS3.
    In my movie, I set a movieclip to invisible in code
    immediately. However, I sometimes see the artefact of the image for
    a split-second on running the swf in my browser. I would therefore
    like to set the property in the designer.
    I am guessing that there is not a way of doing it. Are there
    any suggestions?
    I'm now considering setting the alpha value to 0 in designer,
    and then setting the alpha value to 1 in code when I need to be
    able to see the mc.
    Raffi.

    Hey kglad,
    I appreciate the prompt response. Sorry I wasn't clear enough
    in my initial message.
    I am simply looking to be able to set, say, a rectangle
    primitive to invisible without having to set in the code. At the
    moment, I am setting the visible property to false in the first
    frame in the code. However, as a result, I sometimes (not
    frequently) see artefacting when I run my movie. The rectangle very
    momentarily appears before disappearing.
    Raffi.

  • Problem while encoding JPEG image from JFrame paintComponent in a servlet

    Hello!
    I m developing webapplication in which I made one servlet that calls JFrame developed by me, and then encoding into JPEG image to send response on client browser. I m working on NetBeans 5.5 and the same code runs well. But my hosting server is Linux and I m getting the following error:
    java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
         java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
         java.awt.Window.<init>(Window.java:406)
         java.awt.Frame.<init>(Frame.java:402)
         java.awt.Frame.<init>(Frame.java:367)
         javax.swing.JFrame.<init>(JFrame.java:163)
         pinkConfigBeans.pinkInfo.pinkModel.pinkChartsLib.PinkChartFrame.<init>(PinkChartFrame.java:36)
         pinkConfigBeans.pinkController.showLastDayRevenueChart.processRequest(showLastDayRevenueChart.java:77)
         pinkConfigBeans.pinkController.showLastDayRevenueChart.doGet(showLastDayRevenueChart.java:107)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
    I m building the application in NetBeans and when runs then it runs well, even while browsing from LAN. But when I place the web folder creted under buil directory of NetBeans in the Tomcat on Linux, then it gives above error.
    Under given is the servlet code raising exception
    response.setContentType("image/jpeg"); // Assign correct content-type
    ServletOutputStream out = response.getOutputStream();
    /* TODO GUI output on JFrame */
    PinkChartFrame pinkChartFrame;
    pinkChartFrame = new PinkChartFrame(ssnGUIAttrInfo.getXjFrame(), ssnGUIAttrInfo.getYjFrame(), headingText, xCordText, yCordText, totalRevenueDataList);
    pinkChartFrame.setTitle("[::]AMS MIS[::] Monthly Revenue Chart");
    pinkChartFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    //pinkChartFrame.setVisible(true);
    //pinkChartFrame.plotDataGUI();
    int width = 760;
    int height = 460;
    try {
    BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    pinkChartFrame.pinkChartJPanel.paintComponent(g2);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    encoder.encode(image);
    } catch (ImageFormatException ex) {
    ex.printStackTrace();
    response.sendRedirect("index.jsp");
    } catch (IOException ex) {
    ex.printStackTrace();
    response.sendRedirect("index.jsp");
    out.flush();
    Do resolve anybody!
    Edited by: pinkVag on Oct 15, 2007 10:19 PM

    >
    I m developing webapplication in which I made one servlet that calls JFrame developed by me, and then encoding into JPEG image to send response on client browser. I m working on NetBeans 5.5 and the same code runs well. But my hosting server is Linux and I m getting the following error:
    java.awt.HeadlessException: >That makes sense. It is saying that you cannot open a JFrame in an environment (the server) that does not support GUIs!
    To make this so it will work on the server, it will need to be recoded so that it uses the command line only - no GUI.
    What is it exactly that PinkChartFrame is generated an image of? What does it do? (OK probably 'generate a chart') But what APIs does it use (JFreeChart or such)?

  • Problem while executing the code( that covert jpeg images to movie)

    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.html
    here is the code:
    * @(#)JpegImagesToMovie.java     1.3 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.io.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie3 implements ControllerListener, DataSinkListener {
    public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
         System.err.println("- create processor for the image datasource ...");
         p = Manager.createProcessor(ids);
         } catch (Exception e) {
         System.err.println("Yikes! Cannot create a processor from the data source.");
         return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
         System.err.println("Failed to configure the processor.");
         return false;
         // Set the output content descriptor to QuickTime.
         p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
         System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
         return false;
         tcs[0].setFormat(f[0]);
         System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor. Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
         System.err.println("Failed to realize the processor.");
         return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
         System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
         return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
         p.start();
         dsink.start();
         } catch (IOException e) {
         System.err.println("IO error during processing");
         return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
         dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
    * Create the DataSink.
    DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
         System.err.println("Something is really wrong: the processor does not have an output DataSource");
         return null;
         DataSink dsink;
         try {
         System.err.println("- create DataSink for: " + outML);
         dsink = Manager.createDataSink(ds, outML);
         dsink.open();
         } catch (Exception e) {
         System.err.println("Cannot create the DataSink: " + e);
         return null;
         return dsink;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         evt.getSourceController().stop();
         evt.getSourceController().close();
    Object waitFileSync = new Object();
    boolean fileDone = false;
    boolean fileSuccess = true;
    * Block until file writing is done.
    boolean waitForFileDone() {
         synchronized (waitFileSync) {
         try {
              while (!fileDone)
              waitFileSync.wait();
         } catch (Exception e) {}
         return fileSuccess;
    * Event handler for the file writer.
    public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
    public static void main(String args[]) {
         if (args.length == 0)
         prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
         if (args.equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
         if (outputURL == null || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if (!outputURL.endsWith(".mov") && !outputURL.endsWith(".MOV")) {
         System.err.println("The output file extension should end with a .mov extension");
         prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie3 imageToMovie3 = new JpegImagesToMovie3();
         imageToMovie3.doIt(width, height, frameRate, inputFiles, oml);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= images.size()) {
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
         String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
         System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
         RandomAccessFile raFile;
         raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
         if (buf.getData() instanceof byte[])
              data = (byte[])buf.getData();
         // Check to see the given buffer is big enough for the frame.
         if (data == null || data.length < raFile.length()) {
              data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
         raFile.readFully(data, 0, (int)raFile.length());
         System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
         buf.setLength((int)raFile.length());
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
         // Close the random access file.
         raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    on executing with the command:
    java JpegImagesToMovie -w <width> -h <height> -f <frame rate per sec.> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...
    comes this......
    Exception in thread"JMF thread:SendEventQueue:com.sun.media.processor.unknown Handler" java.lang.NullPointerException"
    plz help

    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • How to create an Average Image from Gray Scale (8 bits) JPEG Images

    I�m trying to create a mean image from 9 JPEG Images, but this mean image has lots of "noise", is distorced, and doesnt�resemble at all the original ones.
    I need this mean image so I�ll correlate each of the original ones to find out the best image I�m going to choose ussing NCC (normalized cross correlation coeficient).
    When I use setRGB(x,y,rgb), it returns diferent "images" according to the number of zeros, for ex.: rgb = 028028028 is different from 28028028 and from 282828. I can�t find a way to work it out.
    My algorithm is the folowing:
            File f;
            double [] [] pixels = null;
            Color [] [] tempPixel = null;
            Integer [] [] byte0 = null;
            Integer [] [] byte1 = null;
            Integer [] [] byte2 = null;
            Integer [] [] byte3 = null;
         Integer [] [] tempPixels = null;
            mean = null;
            int w,h;
            fileNames = new String[numFrames];
            for (int i=1; i<numFrames; i++){
                fileName = path + "Frame#" + i + ".jpg";
                fileNames[i-1] = fileName;
            // just for getting width, height, for configuring pixels array and
            // buffered images - mean & best.
            fileName = path + "Frame#8.jpg";
            f= new File(fileName);
            try{
                temp = ImageIO.read(f);
            }catch(IOException io){ return false;}
            w = temp.getWidth();
            h = temp.getHeight();
            mean = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_GRAY);
         pixels = new double [w][h];
            byte0 = new Integer [w][h];
            byte1 = new Integer [w][h];
            byte2 = new Integer [w][h];
            byte3 = new Integer [w][h];
            tempPixel = new Color[w][h];
              tempPixels = new Integer[w][h];
            f=null; temp = null;
            //reset pixels values.
            for(int x = 0; x < w; x++){
                for(int y = 0; y < h; y++){
                    byte0[x][y] =0;
                    byte1[x][y]=0;
                    byte2[x][y]=0;
                    byte3[x][y] = 0;
                    pixels[x][y] = 0;
            // read each file (image), and according to W & H and collects the
            // pixels values.
            for(int j=0; j<numFrames-1; j++) {
                f = new File(fileNames[j]);
                try{
                    temp = ImageIO.read(f);
                }catch(IOException io){ return false;}
                if(temp!=null)
                    for(int x=0 ; x< temp.getWidth(); x++){
                    for(int y=0; y<temp.getHeight(); y++){
                        tempPixel[x][y] = new Color(temp.getRGB(x,y));
                  pixels[x][y] = pixels[x][y] + temp.getRGB(x,y) / 16581375;
                        //BLUE
                        byte0[x][y] = byte0[x][y] + (tempPixel[x][y].getBlue());//tempPixel[x][y].getBlue(); //& 0xff;
                        //GREEN
                        byte1[x][y] = byte1[x][y] + (tempPixel[x][y].getGreen());// >>8 & 0xff;
                        //RED
                        byte2[x][y] = byte2[x][y] + (tempPixel[x][y].getRed()); //>>16 & 0xff;
                        //ALPHA
                        byte3[x][y] = byte3[x][y] + (tempPixel[x][y].getAlpha()); //>>24 & 0xff;
                f=null;
            }//end of loop for j<numFrames
            String t0, t1, t2, t3;
            for(int x=0 ; x< temp.getWidth(); x++){
                for(int y=0; y< temp.getHeight(); y++){
                     byte0[x][y] = byte0[x][y] / numFrames;
                    if((byte0[x][y])<10)
                             t0= "0" + byte0[x][y].toString();
                    //else if((byte0[x][y])>=10 & ((byte0[x][y])<100))
                    //    t0 = "0" + byte0[x][y].toString();
                    else
                        t0 = byte0[x][y].toString();
                    byte1[x][y] = byte1[x][y] / numFrames;
                    if((byte1[x][y])<10)
                             t1=  "0" + byte1[x][y].toString();
                    //else if((byte1[x][y])>=10 & ((byte1[x][y])<100))
                    //    t1= "0" + byte1[x][y].toString();
                    else
                        t1 = byte1[x][y].toString();
                    byte2[x][y] = byte2[x][y] / numFrames;
                    if((byte2[x][y])<10)
                             t2= "0" + byte2[x][y].toString();
                    //else if((byte2[x][y])>=10 & ((byte2[x][y])<100))
                    //    t2 = "0" + byte2[x][y].toString();
                    else
                        t2 = byte2[x][y].toString();
                    byte3[x][y] = byte3[x][y] / numFrames;
                    if((byte1[x][y])<10)
                        t3="0" + byte3[x][y].toString();
                    else
                        t3 = byte3[x][y].toString();
                        pixels[x][y] = (pixels[x][y]/numFrames) * 16581375;
                    try{
                        String rgbs = t2+t1+t0;
                        Integer rgb = Integer.valueOf(rgbs);
                              //System.out.println("Valor do rgb: " +rgb);
                        mean.setRGB(x,y,(int)pixels[x][y]);
                    }catch(NumberFormatException nfe){
                        System.out.println("ERROR: Integer to STRING: "  + nfe);
                        return false;
                    }// end of catch

    It�s ok, I�ve already found the solution.
    Thanks.

  • I want to create a DVD of JPEG images

    I want to create a DVD of JPEG images from multiple albums in my catalog.  I am using Windows 7 and Premier Elements 11.  I have not been able to insert more than one menu marker in my "video."  Any suggestions?

    BobHabig32453
    I seldom ran across a question to which I could offer an abridged answer. Sorry about that.
    There is an assortment of miscellaneous information to guide your path as to what you can and cannot do with regard to a Premiere Elements DVD Template that represent the Main Menu and Scene Menu set. The number and kind of menu markers that you place on the Timeline are linked to the Menus - Main Menu or Scene Menu depending whether you have placed a Main Menu Marker or Scene Marker on the Timeline. Again, do not put a Stop Marker at the end of the last file on the Timeline.
    Each movie (in your case album) cannot have its own Scene Selection page or pages. All the Timeline scene markers representation found on the Scene Selection page or pages is there in the order that each was placed on the Timeline. There is a limited amount of space under each scene thumbnail, and you do want to avoid button overlap.
    Each main menu and scene menu that came with the program is designed with a certain number of buttons per page (Main Menu page or Scene Selection page).  When the number of Timeline markers exceed the number of designed in buttons per page, the buttons spill over to additional pages (each a copy of the first).
    Most Main Menu pages come with Play All button, Scene Selection button, and some with Main Menu or Bonus Movie button. Most are text type buttons, fewer are thumbnail type buttons for this Main Menu. You see the thumbnail type buttons in the Scene Selection Page, and typically the maximum number there is about 6, may goes to 8 in some rare instances.
    Once you introduce Stop Markers to separate the multi movie type setup, your Play Movie (Play All) button on the Main Menu is meaningless.  And, the reminder, two menu markers cannot occupy the same spot on the Timeline.
    Important to the project are the pixel dimensions of the photos and the duration of the content. If you are heading for DVD-VIDEO on DVD disc Standard or Widescreen, the pixel dimensions should not exceed 1000 x 750 pixel  (landscape) – classical recommendation here and elsewhere. Greater than that typically does not accomplish much other than stressing out the program.  The level of computer resources can often dictate whether the program stress will set in sooner or later. That 1000 x 750 which is not written in stone is close enough to the export standard and will leave some room for pans and zooms if needed. Look to the Premiere Elements burn dialog prior to burn to and look at the Quality Section’s values for Space Required and Bitrate. The DVD-R  4.7 GB/120 min is in reality 4.3 GB and the “for best results” classical recommendation is not to exceed 90 minutes for this type of disc. There is also the DVD double layer disc 8.5 GB (really 7.3 GB)/240 minutes to think about.
    How does this all impact what you outlined for what you would like to do? Many thoughts on that, but for starters:
    Are your photos sized properly for a NTSC or PAL DV Standard or Widescreen project? Are you heading for NTSC or PAL DVD-VIDEO Standard or Widescreen? Are you considering Blu-ray disc format on Blu-ray disc in this regard for your Premiere Elements project.
    How many albums do you envision in each of your planned DVD discs. I suspect the number is going to be in excess of 6 or 8. Here some of the considerations might be:
    …switch the names of the .psd files for the main and scene menu (just the names) so that you can take advantage of the larger number of scene buttons on an already designed Scene Menu. The Timeline markers are Main Menu Markers in this instance, no Scene Markers. Result: One page Main Menu with thumbnails there displaying the first photo in each album.
    …editing the .psd file for a DVD Template to add more buttons to the design. That requires strict adherence to requirements for doing that, including editing with Photoshop CS and later or a version of Photoshop Elements that will open the Layer Groups of the .psd so that you can get at the Folders and Files that you need to modify/duplicate and the like.
    If you wanted text buttons instead of thumbnail buttons, you could look at a DVD Menu such as Faux Widescreen Main Menu Page and customizing that.
    Not sure if long trip descriptions (text) would be feasible. I can offer a how to for creating a page for information before the main menu (like those FBI notices) if you thought that might be appropriate for any overview trip descriptions per disk. Lots of details, Lots of choices, but often with limitations and special considerations if you are restricted to what comes as is with the program.
    Please review the above and then we could fine tune with more specifics.
    Thanks.
    ATR

  • How do i create a jpeg image from clips in fcp

    how do i/can I create a jpeg image from clips in fcp?
    Stephen

    Select clip in timeline and place the playhead over the frame you want to save as a JPEG. Open the share window ( Button on far right of tool bar) and select 'Save current frame'. If you don't see that option click on add destination and select the Save current frame choice. It will be added to your share options.

  • Question about Using BufferedImage to create jpeg image

    I was puzzled by a problem about using of class BufferedImage. I want to dynamicly create a jpeg image with bufferedimage, the step is as follows:
    1.create a new bufferedImage object:
    BufferedImage image = new BufferedImage((int)imageWidth, (int)imageHeight, BufferedImage.TYPE_BYTE_BINARY);
    2.get the Graphics object from image:
         Graphics graphics = image.getGraphics();
    3.then draw string and any other graphics with graphics
    4.create jpeg image:
         try {
         FileOutputStream fos = new FileOutputStream("c://test.jpg");
         BufferedOutputStream bos = new BufferedOutputStream(fos);
         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(bos);
         encoder.encode(image);
         bos.close();
         } catch(Exception e) {
         System.out.println(e);
    The problem is that :
    if the graphic width and height is large enough(in my computer, the largest number is 4000*4000,of course it can be 6000*2000, but the total number is limited.), step 1 will be error: OutofMemory!
    I'm worrying about it all day and night.Even though I try all my best,I still can't find what's wrong with it.
    Can you help me--the helpless one?

    Right. 4000x4000x3bytes ("true" color) is 64 mbytes. Your jpeg file might be smaller of course, but it's still going to be a behomoth. The best thing to try is increasing your java runtime size... I've never had to do this, but you can probably find it on this site somewhere

  • How to create a white back ground for Jpeg image to upload on various webites

    Hello, I have Photoshop Elements 11. I designed a book cover with Microsoft Word 2010 and saved the file as a Pdf. I want to upload an image of this book cover to various web sites that require a Jpeg image and the book cover has to cover at least 85% of the image and require a pure white back ground. Pixel size can be 1,000 or more. Can somebody help me? I did go to the library to get reference books but, I can't ascertain from these books how to do this. I am a beginner to Photoshop and realize I will have to get training for future projects. Thank you very much for any information you provide to me. I wanted to upload an image from my computer to show you the book cover but there was a dialogue box that appeared saying the file was too large to upload. The book cover I designed is 8.5' x 11.0"

    Wow! I can't thank you enough! There is not enough space here for me to express my gratitude for helping me! You are a saint! I had the Pdf files uploaded and stored in my organizer, so the images of the book covers appeared in the bottom of Photoshop Elements 11 Editor. I did exactly as you instructed, then sent the Jpeg  to Amazon and it uploaded in less than 5 minutes. The image could be a little bigger, but now I can utilize the software enough to tweak it.Thanks so much!!!! Any other ideas would be greatly appreciated. Take care and have a great 2013!

  • How to insert a pdf or jpeg image into a blob column of a table

    How to insert a pdf or jpeg image into a blob column of a table

    Hi,
    Try This
    Loading an image into a BLOB column and displaying it via OAS
    The steps are as follows:
    Step 1.
    Create a table to store the blobs:
    create table blobs
    ( id varchar2(255),
    blob_col blob
    Step 2.
    Create a logical directory in the database to the physical file system:
    create or replace directory MY_FILES as 'c:\images';
    Step 3.
    Create a procedure to load the blobs from the file system using the logical
    directory. The gif "aria.gif" must exist in c:\images.
    create or replace procedure insert_img as
    f_lob bfile;
    b_lob blob;
    begin
    insert into blobs values ( 'MyGif', empty_blob() )
    return blob_col into b_lob;
    f_lob := bfilename( 'MY_FILES', 'aria.gif' );
    dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
    dbms_lob.fileclose(f_lob);
    commit;
    end;
    Step 4.
    Create a procedure that is called via Oracle Application Server to display the
    image.
    create or replace procedure get_img as
    vblob blob;
    buffer raw(32000);
    buffer_size integer := 32000;
    offset integer := 1;
    length number;
    begin
    owa_util.mime_header('image/gif');
    select blob_col into vblob from blobs where id = 'MyGif';
    length := dbms_lob.getlength(vblob);
    while offset < length loop
    dbms_lob.read(vblob, buffer_size, offset, buffer);
    htp.prn(utl_raw.cast_to_varchar2(buffer));
    offset := offset + buffer_size;
    end loop;
    exception
    when others then
    htp.p(sqlerrm);
    end;
    Step 5.
    Use the PL/SQL cartridge to call the get_img procedure
    OR
    Create that procedure as a function and invoke it within your PL/SQL code to
    place the images appropriately on your HTML page via the PL/SQL toolkit.
    from a html form
    1. Create an HTML form where the image field will be <input type="file">. You also
    need the file MIME type .
    2. Create a procedure receiving the form parameters. The file field will be a Varchar2
    parameter, because you receive the image path not the image itself.
    3. Insert the image file into table using "Create directory NAME as IMAGE_PATH" and
    then use "Insert into TABLE (consecutive, BLOB_OBJECT, MIME_OBJECT) values (sequence.nextval,
    EMPTY_BLOB(), 'GIF' or 'JPEG') returning BLOB_OBJECT, consecutive into variable_blob,
    variable_consecutive.
    4. Load the file into table using:
    dbms_lob.loadfromfile(variable_blob, variable_file_name, dbms_lob.getlength(variable_file_name));
    dbms_lob.fileclose(variable_file_name);
    commit.
    Regards,
    Simma........

  • Error when exporting to pdf - cannot read a jpeg image, but I do not know which jpeg image.

    I have created a document (A5) in Indesign cs6 with 116 pages. Because I would like to print the book I want to export it to pdf. Normally this is no problem for me, but now I got the following error: "Error encountered while reading JPEG image. Image may be damaged or incompatible. Resave the image with different settings and try again." This is quite annoying as my book contains 631 links of which most are .jpg. Does anyone know how I can find out which picture gives the error?
    What is remarkable is the following. As it is a very large file InDesign automatically splitted it in subsections (with names like 'A5 V' or 'A5 V3'). To get closer to the problem I tried to export each subsection (all between 3 and 30 pages) to pdf. But somehow I managed to do this, so one might think that there is nothing wrong with the document at all. But when I try to expor the document as a whole again I still get this error about the JPEG image. It takes a couple of minutes (somewhere between 30 and 40% of the exporting) before I get the error.
    Is there anything I should have tried which I forgot? I hope anyone can help me with this problem.

    If you are able to export as sections it's almost certainly not actually a problem with the image, but a problem of not enough system resources to finish the job. This is not uncommon with large complex PDF exports.
    Try rebooting, then immediately open ID and try the export again first thing. If it works, great. If  not, you can combine your sections into a single PDF in Acrobat Pro.

  • UI element-Image is not showing JPEG images

    Hi Gurus
       i am facing a problem while displaying an image in ImageUI,
    its not working with JPEG files, also its showing pblm while
    displaying gif images with size above some 50KB. Small size gif images are properly working.
    With Regards
       Vipin

    Hi Vipin,
    Regarding the image visibility, please check the permissions also.
    For eg:
    check with Read/Write permission for yourself and for others with Read permission.
    If you are displaying the images in WebDynpro application then you can allow/restrict the types of images like .jpeg or .png etc..
    Hope this helps..
    Regards
    Piyush
    Please reward points if this helps!!!

  • Posting a chart created with Pages

    I created a chart.
    I want to post it on an internet board.
    I see no way to convert this chart to jpeg, gif or anything else that is usable.
    How do you add a chart created with Pages to an internet post or a blog?
    Thank you in advance for any help.
    I have trouble believing this can not be done.

    ruth nicholls wrote:
    Thanks, Peter. Walt had given me this info too but slightly differently.
    Why in the world would they hide such a function inside the 'print' utility? That is strange.
    It's not hidden.
    We have two ways to create PDFs
    (a) Print as PDF
    (b) Share > Export > PDF.
    If you enter the "Pages User Guide", which is available to all of us, and search for the intricate keyword "PDF" you will get (page 35)
    You can also export Pages documents to Microsoft Word, PDF, Rich Text Format (RTF), and Plain Text. See “Exporting to Other Document Formats” on page 249 for details.
    Page 249 you will read:
    Exporting to Other Document Formats
    You can share your Pages documents across different platforms by exporting them to other formats, such as Microsoft Word, PDF, or plain text.
    If the document you want to export is password-protected, the password protection is removed from Word, RTF, and plain text formats.
    To export a document to another file format:
    1 Choose Share > Export.
    2 Choose a format for the document and click Next.
    3 Type a new name for the document.
    4 Choose where you want to save the document.
    5 Click Export.
    You can export a Pages document in these formats:
    • PDF files can be created using an image quality of good, better, or best. When the image quality is set to best, the resolution of images isn’t scaled down. When the image quality is set to better, images are downsampled to 150 dpi. When the image quality is set to good, images are downsampled to 72 dpi. Images without an alpha channel are JPEG compressed with a compression level of 0.7 at the good setting and 0.9 at the better setting.
    You can password-protect your PDF. To learn more about securing your document,
    see “Password-Protecting Your Document” on page 35.
    When you export a Pages document, hyperlinks are exported. Hyperlinks are
    created in the PDF document for table of contents entries, footnotes and endnotes, webpages, email messages, and bookmarks.
    The PDF file, which preserves font characters used in the document, can be viewed or printed in Preview, viewed or printed in Safari, and edited with a PDF application.
    For the alternate way, it's not a feature dedicated to iWork but it's a component of the operating system so there is no reason to describe it in the application's help.
    If you enter the System Help and search for the same complex keyword, the four first entries returned are:
    Using Preview to view images and PDFs
    Editing Quartz Filters
    Geting the best quality when you print a PDF file
    Saving a document as a PDF file.
    A double click on this entry returns:
    Given that I'm not sure that
    Why in the world would they hide such a function inside the 'print' utility? That is strange.
    Is really adequate
    Yvan KOENIG (from FRANCE mardi 17 février 2009 17:05:11)

Maybe you are looking for

  • Can you put KM attributes in a office document?

    Hello, I have a question : "Can you put KM attributes such as a document version number automatically in a Office document"? For iso documents it's needed to have a version counter in the word document itself. If the km version number could be copied

  • PO Creation, with same Legacy Item No : LSMW-IDOC

    Dear all, I am creatin PO's using LSMW IDOC Method - BUS2012. I could create PO's . But issue is , but issue is PO's are created with Item No in Sequence( 10,20 etc). We need to create PO with same Item No as in Input File. Eg: If Item No are 40 , 50

  • Can not delete outbox item on PC

    there are several items in the folder: Nokia phone Browser-〉Nokia N70-〉Messages-〉Outbox, and they can not be deleted on my pc, however, my N70 phone has no these items! I can use other functions normally,such as send sms on PC via usb connection, can

  • I just got my first mac and can anyone tell me how to change my address book to look like an actual book?

    Just got my first Mac and cant find how to change the appearance of my address book.  Can anyone help?

  • Upgrade and language support

    I've tried ringing the Adobe line but it seems that no-one is there. How much will it cost to upgrade to the Cloud from CS5.5 for three users. Plus does the new InDesign support Japanese and Arabic languages? If not, do we have to download different