net.sf.fmj.media.codec.video.lossless.PNGEncoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fmj Show documentation
Show all versions of fmj Show documentation
Freedom for Media in Java
The newest version!
package net.sf.fmj.media.codec.video.lossless;
import javax.media.*;
import javax.media.format.*;
import net.sf.fmj.media.codec.video.*;
import net.sf.fmj.media.format.*;
/**
* PNG encoder Codec.
*
* @author Ken Larson
*
*/
public class PNGEncoder extends ImageIOEncoder
{
private final Format[] supportedOutputFormats = new Format[] { new PNGFormat(), };
public PNGEncoder()
{
super("PNG");
}
@Override
public Format[] getSupportedOutputFormats(Format input)
{
if (input == null)
return supportedOutputFormats;
final VideoFormat inputCast = (VideoFormat) input;
final Format[] result = new Format[] { new PNGFormat(
inputCast.getSize(), -1, Format.byteArray,
inputCast.getFrameRate()) };
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy