Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Is there anyway to manipulate images taken by the windows phone camera?
Its not editing it like sepia or converting it to black and white, what I would like is adding frames on top of it, or maybe some other funny stuffs like hats or glasses or stuffs like that.
I searched for it, but all I found are converting the images to another colors.
Posted 8-Oct-11 13:23pm
Edited 8-Oct-11 14:19pm
v2
Comments
Edward Nutting at 9-Oct-11 9:00am
   
Try something yourself...
BlackJack99 at 10-Oct-11 6:40am
   
Thank you very much.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

So, anyway, because it seems like there is no answer, here is how i ended up doing it:
 
public partial class MainPage : PhoneApplicationPage
    {
        WriteableBitmap wb;
        PhotoCamera cam;
 
        //constructors, other stuffs...
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
                {
                    base.OnNavigatedTo(e);
                    cam = new PhotoCamera();
                    this.cam.CaptureCompleted += new EventHandler(cam_CaptureCompleted);
                    this.cam.CaptureImageAvailable += new EventHandler(cam_CaptureImageAvailable);
                }
 
    void cam_CaptureImageAvailable(object sender, ContentReadyEventArgs e)
        {
            Dispatcher.BeginInvoke(() => {
                BitmapImage bi = new BitmapImage();
                bi.SetSource(e.ImageStream);
                previewImage1.Source = bi;
                wb = new WriteableBitmap(ImageStack, null);
                previewImage.Source = wb;
            }); 
        }
 
So, basically, i put an Image object, the frames/sprites that i wanted to stack together into a grid, after the photo captured the camera, the image source will be set to that photo, and i initialized a WritableBitmap using that image stack..
of course, because of this, the resolution of the picture is limited to the resolution of the application, but well, better than nothing...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 480
1 Maciej Los 290
2 Richard MacCutchan 225
3 BillWoodruff 185
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411028.1 | Last Updated 10 Oct 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100