![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图像常识
楚楚3107
一点一滴的积累
展开
-
c# 使用FileStream 打开图片并显示
FileStream 打开图片的好处是读取图片到内存,保存为byte[],然后转为bitmap显示。这样被打开的图片资源不被占用。可以进行图片删除操作。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.原创 2022-05-06 14:23:56 · 4656 阅读 · 4 评论 -
c# DrawImage使用时碰到的一些问题。
我在使用c# Graphics类的DrawImage做图像拼接的时候。发现这个方法如果使用的重载方法不对的话,图像拼接会出现问题。Bitmap bitmapJoint = new Bitmap(width, height);Graphics graph = Graphics.FromImage(bitmapJoint);graph.DrawImage(bitmapJoint, width, height);graph.Clear(System.Drawing.Color.Gray);int c原创 2022-04-14 09:51:44 · 1632 阅读 · 0 评论 -
如何快速查看一个图片是RGB的?还是灰度图像?
右击图片属性,摘要,点击详细属性,里面有位深度一项。如果是RGB图,位深度是24;如果是灰度和索引图,位深度是8;灰度是白灰黑表示的图,索引图有可能是彩色的,但也是8位深。转载 2021-03-26 16:56:29 · 5079 阅读 · 0 评论