如何在SQL Sever中保存图像? [英] How to save images in SQL Sever?

查看:94
本文介绍了如何在SQL Sever中保存图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在SQL Server中保存位图图像?我的前端是vb.net ...在PictureBox中的图像修改后,我需要将它保存在数据库中..请帮帮我..

How can I save Bitmap Images in SQL Server? My front end is vb.net...After the modification in image in the PictureBox,I need to save it in the Database..Please help me..

推荐答案

一次又一次地回答这个问题是无法忍受的;它经常被问到。请这样做:

http ://www.codeproject.com/search.aspx?doctypeid = 5& q = SQL +%28images + OR + image%29 [ ^ ]。



现在,它看起来像是在 PictureBox 中修改图像。为什么,在地球上?你可以做到,但这完全没有意义。这个控件只不过是用来做一些非常简单的快捷方式:在屏幕上显示静态图像。如果你做任何更复杂的事情,你只需要做双重工作;而电脑也做双重工作。控制不是图像。



我会告诉你该怎么做。您应该直接在控件中渲染图像,或者在位图上进行渲染,并绘制一些控件的位图。它可以是一个自定义控件,派生自 System.Windows.Forms.Control ,或 Panel ,甚至表格。怎么样?我会解释一下。请看我过去的答案:

如何从旧图纸中清除面板 [ ^ ],

在C#中绘制一个矩形 [ ^ ],

在图片框中附加图片 [ ^ ]。



参见:

mdi子表单之间的绘制线 [ ^ ],

在面板上捕获图纸 [ ^ ],

什么样的俏皮方法是Paint? (DataGridViewImageCell.Paint(...)) [ ^ ],

如何加速我的vb.net应用程序? [ ^ ]。



-SA
It''s unbearable to answer this question again and again; it''s too often asked. Please, do this:
http://www.codeproject.com/search.aspx?doctypeid=5&q=SQL+%28images+OR+image%29[^].

Now, it looks like you modify images in PictureBox. Why, on Earth? You can do it, but it''s totally pointless. This control is nothing but a shortcut used to do something very simple: show a static image on screen. If you do anything even a bit more complex, you simply do double work; and a computer also does double work. Control is not an image.

I''ll tell you what to do instead. You should either render image in the control directly, or do in on a bitmap, and draw a bitmap of some control. It could be a custom control derived from System.Windows.Forms.Control, or Panel, or even Form. How? I''ll explain that. Please see my past answers:
How do I clear a panel from old drawing[^],
draw a rectangle in C#[^],
Append a picture within picturebox[^].

See also:
Drawing Lines between mdi child forms[^],
capture the drawing on a panel[^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
How to speed up my vb.net application?[^].

—SA


看看这个 sql中的图像 [ ^ ]


查看此链接并进行研究..肯定会对您有所帮助...



http://programtechn.blogspot.in/ [ ^ ]
view this link and study it.. Surely it will help for you...

http://programtechn.blogspot.in/[^]


这篇关于如何在SQL Sever中保存图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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