isolatedstorage - Camera Capture Task in windows phone 8 -


i working on windows phone application in need store captured image camera in isolated storage without saving in camera roll. able store captured image in isolated storage copy of captured image in stored in camera roll. there way can keep image within isolated storage rather camera roll.

thanks

if want save isolated storage, cannot use cameracapturetask. in wp8, transparently save copy of image camera roll, regardless of do.

that said, there solution. you'll need use camera apis create , use own cameracapturetask. i'm not going go huge depth, should started.

first thing need follow this tutorial create view , basic application. use cam_captureimageavailable method store image camera roll. you'll want modify store in isolated storage so:

using (e.imagestream) {    using(isolatedstoragefile storagefile = isolatedstoragefile.getuserstoreforapplication())    {       if( !sotragefile.directoryexists(<imagedirectory>)       {          storagefile.createdirectory(<imagedirectory>);       }        using( isolatedstoragefilestream targetstream = storagefile.openfile( <filename+path>, filemode.create, fileaccess.write))       {          byte[] readbuffer = new byte[4096];          int bytesread;          while( (bytesread = e.imagestream.read( readbuffer, 0, readbuffer.length)) > 0)          {             targetstream.write(readbuffer, 0, bytesread);          }       }    } } 

from point, have functional camera application stores isolated storage. may want spice color effects or something, it's not necessary.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -