locked
Resize Image in LightSwitch RRS feed

  • Question

  • Hello,

    I have a LigthSwitch application that allows a user to upload a photograph.  I would like to have LightSwitch automatically resize the image to specific dimensions after the user clicks the save button.  I have found where I can intercept the process in the Inserting and Updating events, but I am not sure how I should go about manipulating the image.  My first thoughts are to store the byte array image to a Bitmap or BitmapImage and make the image modifications there, but I am having trouble referencing either data type within LightSwitch.  Any suggestions would be greatly appreciated.

    Thanks in advance.

    Tuesday, February 25, 2014 4:25 AM

Answers

  • To get an answer you really ought to supply more details: VS version, C#, VB, images formats...

    In any case it is not a LightSwitch solution but more likely a general dotNet solution you need.

    A google search for: "c# resize image" gives all sorts of samples for similar past questions on forum sites.


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.


    • Edited by Xpert360 Tuesday, February 25, 2014 6:14 PM
    • Marked as answer by Angie Xu Wednesday, March 5, 2014 9:14 AM
    Tuesday, February 25, 2014 6:14 PM