I made an application that stores Item picture (jpeg) on SQL Server DB, I am using pictures shot with my camera (file size ~ 2 M). I am checking if picture.Width > 800
or picture.Height > 600
, then I resize the picture to 800x600.
If I export picture from DB, the file size is about 100k, and if I open the same picture in photoshop, the image size is shown 1.37M.
Now my questions are: First, I want to know the space that this picture takes in my DB. The reason I'm resizing the picture before storing it in my DB, is that I imagine it taking a huge space in my DB.
Second, How do I resize a picture to keep it's aspect ratio?