如何解析JPEG标题???? [英] How to Parse JPEG Header????

查看:66
本文介绍了如何解析JPEG标题????的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以给我一个或更好的想法,一个代码示例,演示如何解析一个JPEG标题并搜索标题位于

流中的标记?


基本上,我需要分析上传的JPEG文件,在流中搜索标记

C2,C6和CA,然后设置变量某种指定

是否存在这些标记。 (我需要这些的原因是

确定JPEG是否处于Progressive或Baseline格式,并且
对其执行额外处理。)我有有人告诉我这应该很容易,

但是我不知道从哪里开始。 VB或C#中的任何一个例子都会非常感激!


提前致谢!


Ryan

Can anyone give me an idea or better yet, a code sample, demonstrating how
to parse a JPEG header and search the header for markers located in the
stream?

Basically, I need to analyze an uploaded JPEG file, search for the markers
C2, C6 and CA in the stream, and then set a variable of some sort to specify
whether or not these markers are present. (The reason I need these is to
determine whether the JPEG is in "Progressive" or "Baseline" format and
perform additional processing on it.) I have been told this should be easy,
but I don''t quite know where to start on this. Any example in VB or C# would
be greatly appreciated!

Thanks in advance!

Ryan

推荐答案

Ryan Cooper写道:
Ryan Cooper wrote:
任何人都可以给我一个或更好的想法,一个代码示例,
演示如何解析JPEG标题并搜索位于流中的
标记的标题?

基本上,我需要分析上传的JPEG文件,搜索
标记C2,流中的C6和CA,然后设置一些
排序的变量,以指定这些标记是否存在。 (我需要这些的原因是确定JPEG是否处于Progressive或
Baseline格式并对其执行额外处理。)我已被告知这应该很容易,但我不知道从哪里开始
。 VB或C#中的任何示例都将不胜感激!

提前致谢!
Can anyone give me an idea or better yet, a code sample,
demonstrating how to parse a JPEG header and search the header for
markers located in the stream?

Basically, I need to analyze an uploaded JPEG file, search for the
markers C2, C6 and CA in the stream, and then set a variable of some
sort to specify whether or not these markers are present. (The reason
I need these is to determine whether the JPEG is in "Progressive" or
"Baseline" format and perform additional processing on it.) I have
been told this should be easy, but I don''t quite know where to start
on this. Any example in VB or C# would be greatly appreciated!

Thanks in advance!



http:// www .google.com / search?hl = en& l ... file + format + VB

---和---
http://groups.google.com/groups?hl=e...VB&sa=N&tab=wg


HTH


- 马克



http://www.google.com/search?hl=en&l...file+format+VB
--- and ---
http://groups.google.com/groups?hl=e...VB&sa=N&tab=wg

HTH

-- Mark


嗨瑞安,


这是一个方便的网站,您可以在其中找到大量的文件格式,包括Jpeg。

http://www.wotsit.org/search.asp?s=jpeg


问候,

Fergus
Hi Ryan,

Here''s a handy site at which you can find loads of file formats, including Jpeg.

http://www.wotsit.org/search.asp?s=jpeg

Regards,
Fergus


Hi Fergus;

感谢您对这些文件的链接....绝对更有帮助的是

最后一个人的回复只有谷歌查询......大声笑..好像我没有

已经搜索过google ...我一直在为这个问题打开和关闭

个月...而且就我而言得到的是告诉它可以完成。


但是,你引用我的文件中的信息大部分是

我已经拥有的信息。我已经找到了JPEG

标记的位置以进行渐进式编码确定....但我真正需要的是

关于如何实际解析此标题的一些方向将VB.NET中的信息

转换成某种数组或字符串,然后搜索

这些标记的存在。我得到了打开streamreaders的基本想法,使用

system.io类等,但我对如何将它们放在一起感到困惑。

无论如何,如果你有任何想法如何在JPEG标题中搜索特定的

标记,我感谢您给我的任何方向。


再次感谢。

Ryan

" Fergus Cooney" <音响**** @ post.com>在消息中写道

新闻:O7 ************* @ TK2MSFTNGP10.phx.gbl ...
Hi Fergus;
Thanks for the link to those files.... Definitely more helpful that the
last guy''s reply with nothing but a google query.... lol... as if I havent
already searched google... I''ve been working on this problem on and off for
months... and as far as I have gotten is to be told it can be done.

However, the info in the files you referred me to is for the most part
information I already have. I have figured out the placement of the JPEG
Markers for progressive encoding determination.... But what I really need is
some direction as to how to actually parse this header information in VB.NET
into an array or string of some kind, and then to search for the presence of
these markers. I get the basic idea of opening streamreaders, using the
system.io class, etc. but I get confused about how to put it all together.
Anyways, if you have any idea how to search the JPEG header for specific
markers, I appreciate any direction you can give me.

Thanks again.
Ryan
"Fergus Cooney" <fi****@post.com> wrote in message
news:O7*************@TK2MSFTNGP10.phx.gbl...
嗨Ryan,
这是一个方便的网站,你可以找到大量的文件格式,
包括Jpeg。
http://www.wotsit.org/search.asp?s=jpeg

问候, Fergus
Hi Ryan,

Here''s a handy site at which you can find loads of file formats, including Jpeg.
http://www.wotsit.org/search.asp?s=jpeg

Regards,
Fergus



这篇关于如何解析JPEG标题????的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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