title: How to real time preview change of Video recorder on camera like Vigo Video Hypstar
body: <p>I want to change the Surface preview bottom overlay with gif or image <a href="https://play.google.com/store/apps/details?id=com.ss.android.ugc.boom&amp;hl=en" rel="noreferrer">Like Vigo</a></p>
  
  <p>Like this</p>
  
  <p><a href="https://i.stack.imgur.com/iKfYN.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/iKfYN.gif" alt="enter image description here"></a></p>
  
  <p>Please tell me any sdk or what I am using for this Filter</p>
  
  <p>I am able to change the overlay on the top view using this</p>
  
  <p><a href="https://github.com/SeptiyanAndika/Camera-Overlay-Android" rel="noreferrer">Help of this</a></p>
  
  <pre><code> PictureCallback cameraPictureCallbackJpeg = new PictureCallback() 
    {  
      @Override
      public void onPictureTaken(byte[] data, Camera camera) 
      {
        // TODO Auto-generated method stub   
        Bitmap cameraBitmap = BitmapFactory.decodeByteArray
                                                                    (data, 0, data.length);
  
     int   wid = cameraBitmap.getWidth();
       int  hgt = cameraBitmap.getHeight();
  
      //  Toast.makeText(getApplicationContext(), wid+""+hgt, Toast.LENGTH_SHORT).show();
        Bitmap newImage = Bitmap.createBitmap
                                          (wid, hgt, Bitmap.Config.ARGB_8888);
  
        Canvas canvas = new Canvas(newImage);
  
        canvas.drawBitmap(cameraBitmap, 0f, 0f, null);
  
       Drawable drawable = getResources().getDrawable
                                                            (R.drawable.mark3);
        drawable.setBounds(20, 30, drawable.getIntrinsicWidth()+20, drawable.getIntrinsicHeight()+30);
      drawable.draw(canvas);
  
  
  
        File storagePath = new File(Environment.
                      getExternalStorageDirectory() + "/PhotoAR/"); 
        storagePath.mkdirs(); 
  
        File myImage = new File(storagePath,
                      Long.toString(System.currentTimeMillis()) + ".jpg");
  
        try
        {
          FileOutputStream out = new FileOutputStream(myImage);
          newImage.compress(Bitmap.CompressFormat.JPEG, 80, out);
  
  
          out.flush();
          out.close();
        }
        catch(FileNotFoundException e)
        {
          Log.d("In Saving File", e + "");    
        }
        catch(IOException e)
        {
          Log.d("In Saving File", e + "");
        }
  
        camera.startPreview();
  
  
  
        newImage.recycle();
        newImage = null;
  
        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
  
        intent.setDataAndType(Uri.parse("file://" + myImage.getAbsolutePath()), "image/*");
        startActivity(intent);
  
      }
    };
  </code></pre>
  
  <p>output of this</p>
  
  <p><a href="https://i.stack.imgur.com/G9OUh.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/G9OUh.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/AOpdq.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/AOpdq.jpg" alt="enter image description here"></a></p>