Hi,
I am developing a tool that functions somewhat similar to MS Paint. I got all the functionality to be working fine.
My problems arise when I have to edit huge image files (8000 x 4000 (jpeg format) around 1 MB). When I try to load the image into my picturebox, it takes a really long time.
Even after it finish loading the picture, When ever I scroll over the picturebox, it takes forever (since its redrawing).
Is there anyway that I can make the image loading to be faster, the most important thing is, is there anyway that rightafter i finished loading the image, the picturebox dont have to redraw it self again everytime we scroll the control.
The way I design the picture box is . I put the picture box on top of a panel which have the AutoScroll Property set to be True.
And every time I load the image, I do this:
Image i = Image.FromFile("test.jpg");
PictureBox.Width = i.Width;
.... same thing for height.....
PictureBox.Image = i;
I tried opening up MS Paint and use it to open the Big Image File, and while it takes quite a while to load it but right after it finished loading the picture, you can scroll around the image with ease
Sorry if I cant provide any specific chunk of codes, but I ll be more than gladly to email it to you if youre willing tohelp me out
Urgent response is greatly appreciated
Henky
I am developing a tool that functions somewhat similar to MS Paint. I got all the functionality to be working fine.
My problems arise when I have to edit huge image files (8000 x 4000 (jpeg format) around 1 MB). When I try to load the image into my picturebox, it takes a really long time.
Even after it finish loading the picture, When ever I scroll over the picturebox, it takes forever (since its redrawing).
Is there anyway that I can make the image loading to be faster, the most important thing is, is there anyway that rightafter i finished loading the image, the picturebox dont have to redraw it self again everytime we scroll the control.
The way I design the picture box is . I put the picture box on top of a panel which have the AutoScroll Property set to be True.
And every time I load the image, I do this:
Image i = Image.FromFile("test.jpg");
PictureBox.Width = i.Width;
.... same thing for height.....
PictureBox.Image = i;
I tried opening up MS Paint and use it to open the Big Image File, and while it takes quite a while to load it but right after it finished loading the picture, you can scroll around the image with ease
Sorry if I cant provide any specific chunk of codes, but I ll be more than gladly to email it to you if youre willing tohelp me out
Urgent response is greatly appreciated
Henky