张凯朝

张凯朝的博客

他的个人主页  他的博客

JPEG 损坏

张凯朝  2010年03月04日 星期四 15:09 | 1567次浏览 | 2条评论

不知道是什么原因,存放在我本本里的 JPEG 图片偶尔有损坏的情况发生。
这些图片呢,存放在 Windows 下的 NTFS 分区里,偶尔呢我会在 Linux 下通过 ntfs-3g 挂载并浏览这些图片。这些图片的来源呢,有些是自己用手机拍的,有些呢是从别人的 QQ 相册里下载回来的。
损坏的情况呢,挺奇怪的,在 Windows 下查看的时候似乎其修改日期比损坏前的提前了2秒。大小不变,但是无法装入图像信息,无法预览,无法显示图像内容。
不知道有没有人也遇到我遇到的这种情况呢?到底是怎么回事呢,好像很少去动这些图片,应该是自己没有去修改过的,一直存放在那里,它们咋就自动坏掉了?

评论

我的评论:

发表评论

请 登录 后发表评论。还没有在Zeuux哲思注册吗?现在 注册 !
曾睿

回复 曾睿  2010年03月04日 星期四 15:34

JPEG有一个文件头,你可以用16进制的编辑器去编辑,看看头信息是否损坏掉了。

1条回复

  • 张凯朝

    回复 张凯朝  2010年03月06日 星期六 23:29

    谢谢你的建议,我打开了,居然看到大部分是文本。。。
    不知道是 Windows NTFS 文件系统本身的问题还是在 Linux 下使用 ntfs-3g 引发的问题
    看看都成啥了::

    ions)
    else:
    # Add s[:0] so that if s is Unicode and table is an 8-bit string,
    # table is converted to Unicode. This means that table *cannot*
    # be a dictionary -- for that feature, use u.translate() directly.
    return s.translate(table + s[:0])

    # Capitalize a string, e.g. "aBc dEf" -> "Abc def".
    def capitalize(s):
    """capitalize(s) -> string

    Return a copy of the string s with only its first character
    capitalized.

    """
    return s.capitalize()

    # Substring replacement (global)
    def replace(s, old, new, maxsplit=-1):
    """replace (str, old, new[, maxsplit]) -> string

    Return a copy of string str with all occurrences of substring
    old replaced by new. If the optional argument maxsplit is
    given, only the first maxsplit occurrences are replaced.

    """
    return s.replace(old, new, maxsplit)

    ...

    0条回复

暂时没有评论

Zeuux © 2024

京ICP备05028076号