Question

I'm using a picturebox to display images in a form. If the image is 10X10 pixels and the picturebox size is 100X100 I would like to make the image larger for using the whole picturebox area. When using the zoom property for the picturebox the pixels of the image is smeared out. How to fill the area of the picturebox with a smaller Image and maintain the pixel quality of the image.

Was it helpful?

Solution

You might want to look into creating your own exploded bitmap and then set that as the image of your PictureBox. The most naive approach would be to create a new 100x100 Bitmap, and SetPixel in 10x10 blocks.

OTHER TIPS

Given lc's suggestion, you could see this link for some libraries to use.

If you've got time for doing automated processing beforehand, you could try 3rd party software, something like http://www.imagemagick.org/script/index.php

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top