Results 1 to 4 of 4

Thread: How can I resize the Bitmap image?

  1. #1
    Join Date
    Oct 2010
    Posts
    59

    How can I resize the Bitmap image?

    I have seen that we can resize the bitmap image in .Net Frame. I was trying to do the same in my Windows Phone 7 but was not able to do that. I tried to search for this on internet but not found any successful suggestion. I want to ask you that whether it is possible to do that or not? If you know that how can I resize the BitmapImage instance then please tell me. I will be thankful to all of you for your replies. Please reply as early as possible. Thank you.

  2. #2
    Join Date
    Apr 2008
    Posts
    4,642

    Not possible to resize the Bitmap image

    I think that you are beyond the luck as of the framework perspective. You will be able to do many transforms to the images but they only make once in the UI Tree and after that you cannot do that. You can check for the WriteableBitmapEx if you want to do the image processing to the images. This has the facility to resize and many other things and you can implement it with the Mobile 7. I hope that it will help you. I am using this and found that it is very useful for processing the images.

  3. #3
    Join Date
    May 2008
    Posts
    4,570

    Use Stretch property to resize image.

    I want to know your aim before resizing the images. If you want that the image should display in some different size then the original one then you can use the Stretch property. This will help you to stretch the image on your screen and you will be able to see that in different size. I hope that it will be sufficient for you and if you want more then that then I wish someone on this forum provide some other way to do that.

  4. #4
    Join Date
    May 2008
    Posts
    4,345

    Re: How can I resize the Bitmap image?

    To do that first of all you have to create a function like below.

    Code:
    public ImageSource ResizeImage(ImageSource biInput, double DeltaX, double DeltaY)
      {
        WriteableBitmap otpt;
        ScaleTransform stTmp = new System.Windows.Media.ScaleTransform();
    
        stTmp.ScaleX = DeltaX;
        stTmp.ScaleY = DeltaY;
    
        Image imgTemp = new Image();
        imgTemp.Source = biInput;
          
        otpt = new WriteableBitmap(imgTemp, stTmp);
    
        return otpt;
      }
    After that you have to call that function like below.

    Code:
    BitmapImage btm = new BitmapImage(new Uri("http://efmediasrv08/welcome.png"));
      image1.Source = ResizeImage(btm, .5, .5);

Similar Threads

  1. How to resize the image attachments in Outlook
    By Madison in forum Windows Software
    Replies: 4
    Last Post: 24-01-2010, 06:55 AM
  2. How to resize image in html firefox ?
    By CHARO in forum Windows Software
    Replies: 4
    Last Post: 30-06-2009, 09:02 PM
  3. Bulk image resize using photoshop
    By CheckMeNot in forum Windows Software
    Replies: 3
    Last Post: 13-06-2009, 08:53 PM
  4. Resize Image to fit computer screen
    By Nihar Khan in forum Hardware Peripherals
    Replies: 3
    Last Post: 05-03-2009, 01:05 PM
  5. Resize Image in Vista x64
    By Santanio in forum Windows Software
    Replies: 2
    Last Post: 13-02-2009, 03:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,563,426.37160 seconds with 17 queries