缩放而不更改像素 [英] zoom without changing pixels

查看:94
本文介绍了缩放而不更改像素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不改变c#中的像素的情况下对图片框中的图片进行缩放,就像在绘画中我们可以进行我们想要的缩放但是像素保持不变,请任何人都可以帮助我。

解决方案

在不改变像素的情况下缩放只是荒谬的。缩放时,您总是需要插入像素,因为您总是添加或删除像素。使用 System.Windows.Forms.PictureBox 并不是很荒谬,但是从实际的角度来看,根本没有意义。这是一个冗余控件,不适用于任何动态的。您需要缩放位图,而不是控件。它很容易缩放。



请参阅我最近的回答:如何使用C#Windows窗体调整图像大小? [ ^ ]。



-SA


AFAIK,你无法缩放标准的图片框。



但是你见过这个:一个可缩放和可滚动的PictureBox [ ^

I want to make zoom for a picture in picturebox without changing pixels in c# like in paint we can do the zoom that we want but the pixels stay the same, please can any one helpe me.

解决方案

Zooming without changing pixels is just the absurd. When you scale, you always need to interpolate pixels, just because you always add or remove pixels. Using a System.Windows.Forms.PictureBox is not quite an absurd, as it is possible, but from the practical point of view, it makes no sense at all. This is a redundant control which is not designed for anything dynamic. You need to zoom a bitmap, not a control. It's easy to zoom it.

Please see my recent answer: How Can I Resize An Image Using C# Windows Forms ?[^].

—SA


AFAIK, you can't zoom a standard picturebox.

But have you seen this: A Zoomable and Scrollable PictureBox[^]


这篇关于缩放而不更改像素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆