473,396 Members | 1,871 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,396 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 11540
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.