Click here to Skip to main content
11,495,319 members (66,834 online)
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 Dnyaneshwar@Pune 692
1 CHill60 318
2 Sascha Lefèvre 265
3 Nakul Chaudhari 236
4 OriginalGriff 191
0 Sergey Alexandrovich Kryukov 10,322
1 OriginalGriff 8,821
2 Sascha Lefèvre 3,889
3 Maciej Los 3,422
4 Richard Deeming 2,560


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 10 Oct 2011
Copyright © CodeProject, 1999-2015
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