Textureview/Surface view for Camera preview - Android -


i working on developing android applications uses camera. display camera preview, observed lot of examples using surface view or texture view. why these preferred on using imageview display camera preview? have used imageview display preview , works fine.

thanks.

please not use imageview this. extremely inefficient, , i'd surprised if able produce high-resolution preview (1080p) approach.

surfaceview , textureview both directly push zero-copy buffers camera drivers hardware composer or gpu, respectively. there no buffer copies or transformations, except whatever final conversions need done @ destination. reduces memory bandwidth , cpu overhead substantially.

creating bitmaps slow, cpu-hungry, , makes several copies of each frame, wasting memory well.


Comments

Popular posts from this blog

html - height not adding height to a empty div -

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -