Click here to Skip to main content
16,017,745 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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
Updated 8-Oct-11 13:19pm
v2
Comments
Ed Nutting 9-Oct-11 9:00am    
Try something yourself...
BlackJack99 10-Oct-11 6:40am    
Thank you very much.

1 solution

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...
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900