Search in sources :

Example 1 with ImageFormat

use of android.graphics.ImageFormat in project PhotoNoter by yydcdut.

the class CameraServicePresenterImpl method add2DB.

@Override
public void add2DB(String fileName, int size, String cameraId, long time, int categoryId, boolean isMirror, int ratio, int orientation, String latitude, String longitude, int whiteBalance, int flash, int imageLength, int imageWidth, String make, String model, int imageFormat) {
    SandExif sandExif = new SandExif(orientation, latitude, longitude, whiteBalance, flash, imageLength, imageWidth, make, model);
    SandPhoto sandPhoto = new SandPhoto(SandPhoto.ID_NULL, time, cameraId, categoryId, isMirror, ratio, fileName, size, imageFormat, sandExif);
    mRxSandBox.saveOne(sandPhoto).subscribe(sandPhoto1 -> {
        synchronized (mObject) {
            long id = sandPhoto1.getId();
            sandPhoto.setId(id);
            mQueue.offer(sandPhoto);
            mObject.notifyAll();
        }
    }, (throwable -> YLog.e(throwable)));
}
Also used : Context(android.content.Context) Rect(android.graphics.Rect) RxPhotoNote(com.yydcdut.note.model.rx.RxPhotoNote) ByteArrayOutputStream(java.io.ByteArrayOutputStream) SandPhoto(com.yydcdut.note.entity.SandPhoto) BitmapFactory(android.graphics.BitmapFactory) ExifInterface(android.media.ExifInterface) Inject(javax.inject.Inject) Const(com.yydcdut.note.utils.Const) RxSandBox(com.yydcdut.note.model.rx.RxSandBox) FilePathUtils(com.yydcdut.note.utils.FilePathUtils) Utils(com.yydcdut.note.utils.Utils) ICameraServiceView(com.yydcdut.note.views.service.ICameraServiceView) ImageFormat(android.graphics.ImageFormat) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) SandExif(com.yydcdut.note.entity.SandExif) File(java.io.File) FileNotFoundException(java.io.FileNotFoundException) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) Bitmap(android.graphics.Bitmap) YuvImage(android.graphics.YuvImage) ICameraServicePresenter(com.yydcdut.note.presenters.service.ICameraServicePresenter) PhotoNote(com.yydcdut.note.entity.PhotoNote) Queue(java.util.Queue) YLog(com.yydcdut.note.utils.YLog) IView(com.yydcdut.note.views.IView) InputStream(java.io.InputStream) SandExif(com.yydcdut.note.entity.SandExif) SandPhoto(com.yydcdut.note.entity.SandPhoto)

Aggregations

Context (android.content.Context)1 Bitmap (android.graphics.Bitmap)1 BitmapFactory (android.graphics.BitmapFactory)1 ImageFormat (android.graphics.ImageFormat)1 Rect (android.graphics.Rect)1 YuvImage (android.graphics.YuvImage)1 ExifInterface (android.media.ExifInterface)1 PhotoNote (com.yydcdut.note.entity.PhotoNote)1 SandExif (com.yydcdut.note.entity.SandExif)1 SandPhoto (com.yydcdut.note.entity.SandPhoto)1 RxPhotoNote (com.yydcdut.note.model.rx.RxPhotoNote)1 RxSandBox (com.yydcdut.note.model.rx.RxSandBox)1 ICameraServicePresenter (com.yydcdut.note.presenters.service.ICameraServicePresenter)1 Const (com.yydcdut.note.utils.Const)1 FilePathUtils (com.yydcdut.note.utils.FilePathUtils)1 Utils (com.yydcdut.note.utils.Utils)1 YLog (com.yydcdut.note.utils.YLog)1 IView (com.yydcdut.note.views.IView)1 ICameraServiceView (com.yydcdut.note.views.service.ICameraServiceView)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1