app/src/main/java/fi/finwe/orion360/sdk/pro/examples/MainMenu.java
public static void createThumbnailForVideo(Context context, String videoUri, int positionMs,
                                                 int heightPx, String thumbnailUri, int jpgQuality) {
        if (!new File(thumbnailUri).exists()) {
            Bitmap videoFrame = extractFrameFromVideo(context, videoUri, positionMs);
            Bitmap scaledFrame = scaleBitmapToHeight(videoFrame, heightPx);
            saveBitmapAsJpg(scaledFrame, thumbnailUri, jpgQuality);
        }
    }
/**
     * Create a JPEG thumbnail image for a video file.
     *
     * @param context Android Context, such as an Activity.
     * @param videoUri The URI of the video file who to create a thumbnail image.
     * @param positionMs The video position in time (milliseconds) where to extract a frame.
     * @param heightPx The thumbnail height in pixels (scaling maintains aspect ratio).
     * @param thumbnailUri The absolute file path in the local file system where to save the image.
     * @param jpgQuality The JPEG algorithm compression quality in range [0-100], 100 = best.
     */
Create a JPEG thumbnail image for a video file.
@param context Android Context, such as an Activity.
@param videoUri The URI of the video file who to create a thumbnail image.
@param positionMs The video position in time (milliseconds) where to extract a frame.
@param heightPx The thumbnail height in pixels (scaling maintains aspect ratio).
@param thumbnailUri The absolute file path in the local file system where to save the image.
@param jpgQuality The JPEG algorithm compression quality in range [0-100], 100 = best.
Create a JPEG thumbnail image for a video file . @param context Android Context such as an Activity . @param videoUri The URI of the video file who to create a thumbnail image . @param positionMs The video position in time ( milliseconds ) where to extract a frame . @param heightPx The thumbnail height in pixels ( scaling maintains aspect ratio ) . @param thumbnailUri The absolute file path in the local file system where to save the image . @param jpgQuality The JPEG algorithm compression quality in range [ 0 - 100 ] 100 = best .
public static void createThumbnailForVideo(Context context, String videoUri, int positionMs,
                                                 int heightPx, String thumbnailUri, int jpgQuality) {
        if (!new File(thumbnailUri).exists()) {
            Bitmap videoFrame = extractFrameFromVideo(context, videoUri, positionMs);
            Bitmap scaledFrame = scaleBitmapToHeight(videoFrame, heightPx);
            saveBitmapAsJpg(scaledFrame, thumbnailUri, jpgQuality);
        }
    }
public static void createThumbnailForVideo ( Context context , String videoUri , int positionMs , int heightPx , String thumbnailUri , int jpgQuality ) { if ( ! new File ( thumbnailUri ) . exists ( ) ) { Bitmap videoFrame = extractFrameFromVideo ( context , videoUri , positionMs ) ; Bitmap scaledFrame = scaleBitmapToHeight ( videoFrame , heightPx ) ; saveBitmapAsJpg ( scaledFrame , thumbnailUri , jpgQuality ) ; } }
Create a JPEG thumbnail image for a video file.
Create a JPEG thumbnail image for a video file .