将图像插入具有特定大小的数据库 [英] insert image to database with specific size

查看:72
本文介绍了将图像插入具有特定大小的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将图片插入到具有特定大小的数据库中。例如70KB

以及如何检索它。谢谢

how can insert picture to database with specific size.for example 70KB
and how can retrieve it.thanks

推荐答案

如果你想要一个特定的字节大小,那么你唯一的选择就是以非压缩格式创建它,比如位图,具有固定的颜色深度,并将你想要的图像绘制到那里,根据需要调整大小。

至于保存和检索它,请参见此处:为什么我得到参数无效。我从数据库中读取图像时出现异常? [ ^ ]
If you want a specific size in terms of bytes, then your only option is to create it in an uncompressed format such as a bitmap, with a fixed colour depth and draw the image you want into that, resizing as necessary.
As far as saving and retrieving it, see here: Why do I get a "Parameter is not valid." exception when I read an image from my database?[^]


也许这可以帮到你



www.youtube.com/watch?v=mxjeE9no06w



www.youtube.com/watch?v=_9J7C2u_jIY



:)
maybe this may help you

www.youtube.com/watch?v=mxjeE9no06w

www.youtube.com/watch?v=_9J7C2u_jIY‎

:)


这篇关于将图像插入具有特定大小的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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