boofcv.io.wrapper.images
Class JpegByteImageSequence<T extends ImageBase>
- java.lang.Object
-
- boofcv.io.wrapper.images.JpegByteImageSequence<T>
-
- All Implemented Interfaces:
- SimpleImageSequence<T>
public class JpegByteImageSequence<T extends ImageBase> extends java.lang.Object implements SimpleImageSequence<T>
Create a sequence from an array of jpeg images in byte[] array format. Each image is decompressed as need
-
-
Constructor Summary
Constructors Constructor and Description JpegByteImageSequence(java.lang.Class<T> imageType, java.util.List<byte[]> jpegData, boolean loop)JpegByteImageSequence(ImageType<T> imageType, java.util.List<byte[]> jpegData, boolean loop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Call when done reading the image sequence.intgetFrameNumber()Returns the number of the current frame in the sequence.java.awt.image.BufferedImagegetGuiImage()Returns the image in the original format that it was read in as.ImageType<T>getImageType()Returns the type of class used to store the output imageintgetNextHeight()Returns the height of the next imageintgetNextWidth()Returns the width of the next imagebooleanhasNext()If a new image is available.Tnext()Returns the next image available in the sequence.voidreset()Start reading the sequence from the startvoidsetLoop(boolean loop)Sets if the video should loop or not
-
-
-
Constructor Detail
-
JpegByteImageSequence
public JpegByteImageSequence(ImageType<T> imageType, java.util.List<byte[]> jpegData, boolean loop)
-
JpegByteImageSequence
public JpegByteImageSequence(java.lang.Class<T> imageType, java.util.List<byte[]> jpegData, boolean loop)
-
-
Method Detail
-
getNextWidth
public int getNextWidth()
Description copied from interface:SimpleImageSequenceReturns the width of the next image- Specified by:
getNextWidthin interfaceSimpleImageSequence<T extends ImageBase>
-
getNextHeight
public int getNextHeight()
Description copied from interface:SimpleImageSequenceReturns the height of the next image- Specified by:
getNextHeightin interfaceSimpleImageSequence<T extends ImageBase>
-
hasNext
public boolean hasNext()
Description copied from interface:SimpleImageSequenceIf a new image is available.- Specified by:
hasNextin interfaceSimpleImageSequence<T extends ImageBase>- Returns:
- true if a new image is available.
-
next
public T next()
Description copied from interface:SimpleImageSequenceReturns the next image available in the sequence.- Specified by:
nextin interfaceSimpleImageSequence<T extends ImageBase>- Returns:
- Next image in the sequence.
-
setLoop
public void setLoop(boolean loop)
Description copied from interface:SimpleImageSequenceSets if the video should loop or not- Specified by:
setLoopin interfaceSimpleImageSequence<T extends ImageBase>- Parameters:
loop- true for looping forever, false for once
-
getGuiImage
public java.awt.image.BufferedImage getGuiImage()
Description copied from interface:SimpleImageSequenceReturns the image in the original format that it was read in as. When dealing with swing or any standard Java SE environment this will almost always be BufferedImage. The type has been abstracted out to provide better Android support.- Specified by:
getGuiImagein interfaceSimpleImageSequence<T extends ImageBase>- Returns:
-
close
public void close()
Description copied from interface:SimpleImageSequenceCall when done reading the image sequence.- Specified by:
closein interfaceSimpleImageSequence<T extends ImageBase>
-
getFrameNumber
public int getFrameNumber()
Description copied from interface:SimpleImageSequenceReturns the number of the current frame in the sequence.- Specified by:
getFrameNumberin interfaceSimpleImageSequence<T extends ImageBase>- Returns:
- Frame ID number.
-
getImageType
public ImageType<T> getImageType()
Description copied from interface:SimpleImageSequenceReturns the type of class used to store the output image- Specified by:
getImageTypein interfaceSimpleImageSequence<T extends ImageBase>
-
reset
public void reset()
Description copied from interface:SimpleImageSequenceStart reading the sequence from the start- Specified by:
resetin interfaceSimpleImageSequence<T extends ImageBase>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG