preview

Camera2 get continuous access to camera preview images

偶尔善良 提交于 2019-11-29 07:47:58
I want to extend an app from Camera1 to Camera2 depending on the API. One core mechanism of the app consists in taking preview pictures at a rate of about 20 pics per second. With Camera1 I realized that by creating a SurfaceView, adding a Callback on its holder and after creation of the surface accessing the preview pics via periodic setOneShotPreviewCallbacks. That was pretty easy and reliable. Now, when studying Camera2, I came "from the end" and managed to convert YUV420_888 to Bitmap (see YUV420_888 to Bitmap Conversion ). However I am struggling now with the "capture technique". From the

Invisible SurfaceView for Camera Preview

我的未来我决定 提交于 2019-11-29 07:06:05
I need to get camera preview data only, but not visible preview. Since I'm doing all this in a service, I had to create a dummy SurfaceView, which works very well. I've used the code from this answer: https://stackoverflow.com/a/10268650/1395697 However, with TYPE_SYSTEM_OVERLAY it didn't work. It was invisible but no preview data was received (in onPreviewFrame() ). When I change this argument to 0, I get preview data, but the SurfaceView is visible. Do you know any other way to do this? What I did now is just make a visible SurfaceView with width and height of 1 and then I create an

How to recover camera preview from sleep?

馋奶兔 提交于 2019-11-29 07:03:08
I have an application that shows camera preview and I would like the user to be able to put the phone to sleep and then wake it so that my application will recover correctly. The problem is that when returning from sleep the camera preview won't restart. I have implemented the camera preview as is presented in the api demos, but it seems that the api demo example works only through sheer luck. In the example the screen orientation is forced to landscape, which means that the phone will go through configuration change every time the phone goes to sleep, since the lockscreen is in portrait mode.

how to preview an image before upload in various browsers

柔情痞子 提交于 2019-11-29 03:46:24
问题 I want to show preview of an image before it is uploaded. I have found a partial solution that works for ie6 and firefox, and havent yet tested it in ie7 or ie8. But i want a solution that works in safari, ie7 and ie8 as well. Here is the solution obtained by combining the ie6 and firefox solution: function preview(what) { if(jQuery.browser.msie) { document.getElementById("preview-photo").src=what.value; return; } else if(jQuery.browser.safari) { document.getElementById("preview-photo").src

No “Docked Mode” option in “Preview” settings in Android Studio once undocked

ε祈祈猫儿з 提交于 2019-11-29 02:47:25
Here is the Docked mode option for "Preview" window. I removed the docked mode i.e. undocked it. And here is what I got. There is no more "Docked Mode" option. Now I cannot properly work with designing layouts. Preview automatically hides when I change anything in the layout. Here is the simple solution for reverting to "Docked Mode". Select the Preview Window Go to Window menu > Active Tool Window There you go. The Preview window is in Docked Mode. And there is the option for Docked Mode again. Option 1 First open any layout file to set the preview as active window . Then as the first answer

Scaled live iPhone Camera view in center, “CGAffineTransformTranslate” not working

我怕爱的太早我们不能终老 提交于 2019-11-29 00:11:41
I have a little problem which I could not solve. I really hope someone can help me with that. I wanted to resize the live camera view and place it in the center, using the following code below: picker.cameraViewTransform = CGAffineTransformScale(picker.cameraViewTransform, 0.5, 0.56206); picker.cameraViewTransform = CGAffineTransformTranslate(picker.cameraViewTransform, 80, 120); But all I got was a scaled 1/2 sized view on the top left of the screen. It seems as though "CGAffineTransformTranslate" does nothing at all. The translation didn't work even when I used: picker.cameraViewTransform =

Android - Camera Preview

我们两清 提交于 2019-11-28 16:52:34
问题 i'm trying the camera preview This is my code and it doesn't throw any error, but the screen is still black. Any ideas? this.setContentView(R.layout.camerapreview); SurfaceView cameraSurface = (SurfaceView)findViewById(R.id.cpPreview); SurfaceHolder holder = cameraSurface.getHolder(); holder.addCallback(this); holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); this.camera = Camera.open(); this.camera.setPreviewDisplay(holder); this.camera.startPreview(); camerapreview.xml <?xml version=

Eclipse code birdview plugin

梦想的初衷 提交于 2019-11-28 16:41:24
问题 I wonder, if there is an Eclipse plugin for code birdview (preview, visualization, minimap, however it may be called)? I mean, when you see your code in a small preview window and may scroll using this window. Wait, I'll show you... Like this. (See the column, where the white rectangle is). 回答1: I saw this question again today, and found someone working on such a plugin on github. I have no idea how far progressed this project is, but it may be worth checking out: https://github.com/apauzies

How do I preload images into dropzone.js

邮差的信 提交于 2019-11-28 16:28:54
问题 I have a dropzone.js instance on a web page with the following options: autoProcessQueue:false uploadMultiple:true parallelUploads:20 maxFiles:20 It is programmatically instantiated, as it is part of a larger form. I have it rigged up to process the queue when the form is submitted. The goal is for my users to be able to use the dropzone to manage images for an item, so when I load my 'edit/update' view for an item, I'd like to preload the dropzone with the images that had previously been

Can I see changes before I save my file in Vim?

依然范特西╮ 提交于 2019-11-28 15:04:10
I use Vim. I open a file. I edit it and I want to see what I've edited before I save it. How can I do this in Vim? Bill Lynch http://vim.wikia.com/wiki/Diff_current_buffer_and_the_original_file Here is a function and command to see a diff between the currently edited file and its unmodified version in the filesystem. Just put this in your vimrc or in the plugin directory, open a file, make some modifications without saving them, and do :DiffSaved . function! s:DiffWithSaved() let filetype=&ft diffthis vnew | r # | normal! 1Gdd diffthis exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" .