Hi there,
I've been told to write a custom control using C#.NET ( 2.0 ).
This control should be able to display images and give access to zoom functionality. I've visited numerous How-To pages and the main stream approach appears to be a panel/groupBox containing a pictureBox, resizing that pictureBox and using the PictureBoxSizeMode.StretchImage property.
I don't want that. What I want is some "real" zoom effect. So I continued my search for good tutorials until I found this. After reading this small article I began working with the 'graphics' class which appeared to have everything I need. Now I can draw all kinds of manipulated images, which almost perfectly suites my needs. Only almost because I can only DRAW them where I would also need to SAVE them ... And this basically is my question. How do I manipulate images ( for example but not restricting to Bitmaps ), draw them AND save them afterwards ?
Actually saving these images is not my actual issue. My real problem is that I would like to use the PictureBox.SizeMode.AutoSize property inside my custom control so refitting the internal pictureBox is not such a huge pain. But since I am only drawing the modified image ( e.g. using Graphics.TranslateTransform before drawing ) and cannot actually save it, I have no chance to resize the picture box to the new image's size - the image's size always stays the sime ...
Amnu