从数据库创建图像缩略图 [英] Create image thumbnails from database

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

问题描述

大家好,

我比较新鲜.
我的数据库中有一个表,其中的列为Photo,数据类型为image.

照片栏中的数据以二进制格式存储.

我想创建一个程序,将生成缩略图(.jpg)到我的本地计算机中.

请帮帮我.. !!

解决方案

将每个图像读入Image类实例.
使用 Image.GetThumbnailImage [ 解决方案

Read each image into an Image class instance.
Use the
Image.GetThumbnailImage[^] method to create the thumbnail.

You can then use the Image.Save method to create files.

(But personally, I''d do it the other way - store thumbnails in the DB along with a location specifier for the full image. Images can take up significant DB space and bandwidth!)


这篇关于从数据库创建图像缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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