Package net.sf.fmj.media.format

Examples of net.sf.fmj.media.format.GIFFormat


  }
 
  public void testVideo() throws ParseException
  {
    test(new JPEGFormat());
    test(new GIFFormat());
    test(new PNGFormat());
    test(new GIFFormat(new Dimension(640, 480), -1, Format.byteArray, -1.f));
   
//        test(new VideoFormat(VideoFormat.JPEG_RTP));
//        test(new VideoFormat(VideoFormat.H261_RTP));
//        test(new VideoFormat(VideoFormat.MPEG_RTP));
//        test(new VideoFormat(VideoFormat.H263_RTP));
View Full Code Here


        // TODO: Q, decimation
       
      }
      else if (f.getClass() == GIFFormat.class)
      {
        final GIFFormat gf = (GIFFormat) vf;
        list.add(dimensionToStr(gf.getSize()));
        list.add(intToStr(gf.getMaxDataLength()));
        if (gf.getDataType() != null && gf.getDataType() != Format.byteArray)
          list.add(dataTypeToStr(gf.getDataType()));
        list.add(floatToStr(gf.getFrameRate()));
       
      }
      else if (f.getClass() == PNGFormat.class)
      {
        final PNGFormat pf = (PNGFormat) vf;
View Full Code Here

              Class dataType = t.nextDataType();
        if (dataType == null)
          dataType = Format.byteArray;  // default
              final float frameRate = t.nextFloat();
             
        return new GIFFormat(size, maxDataLength, dataType, frameRate);
      }
      else if (formatClass == PNGFormat.class)
      {
        final java.awt.Dimension size = t.nextDimension();
              final int maxDataLength = t.nextInt();
View Full Code Here

  @Override
  public Format[] getSupportedInputFormats()
  {
    return new Format[] {
        new JPEGFormat(),
        new GIFFormat(),
        new PNGFormat()};
  }
View Full Code Here

  {
    if (input == null)
      return supportedOutputFormats;
    final VideoFormat inputCast = (VideoFormat) input;
    final Format[] result = new Format[] {
        new GIFFormat(inputCast.getSize(), -1, Format.byteArray, inputCast.getFrameRate())};
 
    return result;
  }
View Full Code Here

      }
     
      if (frameContentType.equals("image/jpeg"))
        format = new JPEGFormat(new Dimension(image.getWidth(null), image.getHeight(null)), Format.NOT_SPECIFIED, Format.byteArray, -1.f, Format.NOT_SPECIFIED, Format.NOT_SPECIFIED);
      else if(frameContentType.equals("image/gif"))
        format = new GIFFormat(new Dimension(image.getWidth(null), image.getHeight(null)), Format.NOT_SPECIFIED, Format.byteArray, -1.f);
      else if(frameContentType.equals("image/png"))
        format = new PNGFormat(new Dimension(image.getWidth(null), image.getHeight(null)), Format.NOT_SPECIFIED, Format.byteArray, -1.f);
      else
        throw new ResourceUnavailableException("Unsupported frame content type: " + frameContentType);
      // TODO: this discards first image.  save and return first time readFrame is called.
View Full Code Here

TOP

Related Classes of net.sf.fmj.media.format.GIFFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.