reduce of picture to fit panel size
-
I'm making a project in c# that looks like Paint.Net i hace a panel in the middel of the form (form size=900,500 panel size=800,400) when i load a bigger picture like 801,401 and above i don't want to increase the panel size instead i want to reduce the pic's pixel so that will fit into the original panel size. can someone help me with that ? :doh:
-
I'm making a project in c# that looks like Paint.Net i hace a panel in the middel of the form (form size=900,500 panel size=800,400) when i load a bigger picture like 801,401 and above i don't want to increase the panel size instead i want to reduce the pic's pixel so that will fit into the original panel size. can someone help me with that ? :doh:
It's difficult to give you a simple answer to that, as there are a lot of factors that are involved. How are you showing the picture in the panel? Hopefully, you are handling the Paint event, and drawing it yourself. If not, why not? How do you want to show the picture? Zoomed? Stretched? Proportional to the panel size, or the original image size? (i.e. if the panel is 800 x 400 and the picture is 1000x1000, what do you show - all the pixels? All the pixels horizontally, and some of the vertical ones? Or something else?)
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
-
It's difficult to give you a simple answer to that, as there are a lot of factors that are involved. How are you showing the picture in the panel? Hopefully, you are handling the Paint event, and drawing it yourself. If not, why not? How do you want to show the picture? Zoomed? Stretched? Proportional to the panel size, or the original image size? (i.e. if the panel is 800 x 400 and the picture is 1000x1000, what do you show - all the pixels? All the pixels horizontally, and some of the vertical ones? Or something else?)
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."