473,434 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

PictureBox : Zooming without anti-aliasing

I have an app where I want to show an icon in a large PictureBox.
I've set the SizeMode to Zoom but the icon image is extremely fuzzy because
the scaling up also anti-aliases. Is there a way to turn the anti-aliasing
off so I get a nice blocky icon image?

--

"I have nothing but the greatest respect for other peoples' crackpot
beliefs".
-- Sam the Eagle.

Jun 27 '06 #1
1 11550
There's nothing built-in to PictureBox to change the way scaling of images is
performed. You would have to create your own PictureBox-derived class and
override OnPaint(). You could try simply setting Graphics.InterpolationMode
to Low. e.g.
protected override void OnPaint(PaintEventArgs pe)
{
pe.Graphics.InterpolationMode =
System.Drawing.Drawing2D.InterpolationMode.Low;
base.OnPaint(pe);
}

--
http://www.peterRitchie.com/
"John" wrote:
I have an app where I want to show an icon in a large PictureBox.
I've set the SizeMode to Zoom but the icon image is extremely fuzzy because
the scaling up also anti-aliases. Is there a way to turn the anti-aliasing
off so I get a nice blocky icon image?

--

"I have nothing but the greatest respect for other peoples' crackpot
beliefs".
-- Sam the Eagle.

Jun 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gopi | last post by:
Hi All I have set a BackgroundImage for windows forms and i need to implement the image zooming feature for the form ie when ever i m zooming in or zooming out the form the corrosponding...
3
by: cdj | last post by:
Hi all, I've got a picturebox on a form, and a save button. When I go to save, the app craps out with the following error: ================== An unhandled exception of type...
7
by: Randy Vande Hei | last post by:
Does anyone know how to change the the GDI+ coordinate system like you used to be able to do in VB6 with the picturebox.scale method. The picturebox.scale method took an x,y point defining the...
1
by: M West | last post by:
continuation of my previous post, thanks to all those that contributed with answers I am creating a control that will take an image and make parts of it transparent, this is done by creating and...
2
by: Just Me | last post by:
I do the following where sss is a string equal to a filename. PictureBox.Image = = New Bitmap(sss) It occurred to me that the file will be locked until the picturebox is disposed at the...
3
by: b747_440 | last post by:
Hello Newsgroup, I try to resize and move a picturebox. However, after each operation the picture box is being redrawn. This causes flickering. Is it possible to suppress the first redraw and draw...
4
by: wasishincar | last post by:
I'm trying to read a bitmap and zoom in/out it on screen. I wrote some code but it did not perform as I expect. The bitmap shift 1 pixel to the upper-left coner when zooming in/out button was...
4
by: =?Utf-8?B?U3BlZWR5?= | last post by:
Hi there, I am currently writing an application where one inspects images and annotates certain features. Thus, one has to zoom in (4x) and pan around. The features are marked with little red...
0
by: sorab | last post by:
I hav created a bimap image at run time using graphics object in vb.net. i display that image in the picture box i have also implemented few mouse events on that image. e.g. I can draw lines with...
0
by: johot | last post by:
I am currently creating a little photo application. In this application the user is able to zoom in the image and after zooming panning around inside the zoomed image with the mouse. The strange...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.