生成自定义图像文件类型的缩略图? [英] Generating Thumbnails for Custom Image File Types?

查看:80
本文介绍了生成自定义图像文件类型的缩略图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以...我为图像创建了自己的文件格式标准.我是从头开始构建标准的,它不是jpg或bmp文件的包装器.它是自己的文件类型(甚至不是序列化的对象,而是原始数据).嗯,您可以猜到,Windows不会在桌面或文件夹内显示图片.关于新格式的整个想法是将元数据存储在图片内部.我知道Windows会保留元数据,例如快门速度,对比度水平和照相机具有的其他设置(如果照相机将这些信息放入其中),但是我正在谈论的元数据是诸如照片的拍摄地点,照片中的人物以及其他信息(您甚至可以标记图像的一部分,这对于通过家庭照片和命名个人来进行遗传学的完美选择).这只是我自己的个人项目,目的是让我时刻关注图像,不可预测的/非常动态的IO以及遇到的任何其他问题.但是我真的希望Windows能够将图片的缩略图显示为桌面或文件夹中的图标,老实说,我不知道从哪里开始实现这一目标.我需要编写编解码器吗?外壳扩展? Windows驱动程序?我找不到有关如何执行此操作的任何信息.我有一个C#DLL,其中包含此图片类型所需的2个类,可以将其转换为该类型,也可以将其转换为带有该标签的所有辅助方法以及所拥有的内容.

So... I created my own file format standard for images. I built the standard from scratch, it's not a wrapper around a jpg or bmp file. It's its own file type (not even a serialized object, but raw data). Well, as you can guess, windows won't display the picture on the desktop or inside folders. The whole idea about the new format is that meta data is stored inside the picture. I know windows keeps meta data like shutter speed, contrast levels and other settings that the camera had (if the camera puts that info in) but the meta data I'm talking about is stuff like where the picture was taken, who's in the picture and other information (you can even tag a section of the image, it'd be perfect for geneology with family pics and naming individual people). This is just my own personal project to keep me on my toes with images, unpredictable/very dynamic IO, and whatever else I run across. But I REALLY want Windows to be able to display the thumbnail of the pictures as the icons on the desktop or in folders and I honestly have no idea where to start to make that happen. Do I need to write a codec? Shell extension? Windows driver? I can't find anything about how to do this. I have a C# DLL with the 2 classes I need for this picture type, converting to it and from it, as well as any helper methods with the tags and what have you.


推荐答案

为什么您感觉必须使用自己的文件格式?图像中PropertyItem的数量或PropertyItems的大小没有限制.如果使用标准格式,则Windows不会显示缩略图.
Why do you feel that you must use your own file format?  There is no limit to the number of PropertyItems or the size of the PropertyItems in an image.  If you used the standard format, Windows would have no problem displaying the thumbnails.


这篇关于生成自定义图像文件类型的缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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