Muddz / QuickShot

[Moved to MavenCentral] Capture images of any View, SurfaceView or Bitmap from your Android app in: .jpg .png or .nomedia with simple oneliner codes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

couldn't create bitmap of the surfaceview

SunitRoy2703 opened this issue · comments

I'm trying to capture surface view in camera but it is returning
couldn't create bitmap of the surfaceview
on onQuickShotFailed()

it there any reasons?
View current = preview.getSurfaceView(this);
QuickShot.of(current).setResultListener(this).save();

It should work with SurfaceView since it does in my demo.

This simple way should work:

surfaceView = v.findViewById(R.id.surfaceview);
QuickShot.of(surfaceView).setResultListener(this).toPNG().save();

I'm not sure what your preview.getSurfaceView(this); returns.
Also make sure your SurfaceView is ready and up and running when you call QuickShot.save()

Update I have resolved the issue, it wasn't related to the library 😃