简体   繁体   English

使用System.Drawing.Image作为较大图像的居中部分?

[英]Using a System.Drawing.Image as the centered part of a larger image?

I have a System.Drawing.Image that I would like to use as the centered portion for a new, larger image. 我有一个System.Drawing.Image我想用作新的更大图像的居中部分。 I'm given the dimensions of the (always) larger image and the idea is to make that image all white and overlay its center with the first image. 我得到了(总是)更大图像的尺寸,其想法是使该图像全白,并在其中心覆盖第一个图像。 Is there a way to do this using GDI+? 有没有办法使用GDI +做到这一点? Some combination of TextureBrush and the Graphic class perhaps? 也许TextureBrush和Graphic类的某种组合? I'm open to suggestions. 我愿意接受建议。 Thanks! 谢谢!

Lots of similar questions, here's one that I think will show you the basics: 许多类似的问题,我认为这是向您展示的基本知识:

How could I position multiple transparent PNGs onto a JPG using c# and asp.net? 如何使用c#和asp.net将多个透明PNG定位到JPG上?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM