我可以修复损坏的jpeg数据的照片吗? [英] Can I fix photos with corrupt jpeg data?

查看:88
本文介绍了我可以修复损坏的jpeg数据的照片吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的手机(android,fwiw)拍摄的照片已损坏.我不确定这样做的原因或方式,但似乎阻止了我将照片上传到某些服务.如果我将照片移到计算机上并在GIMP中打开,我会看到警告消息:

My phone (android, fwiw) takes pictures that are corrupted. I'm not sure why or how it is doing this, but it seems to prevent me from uploading the photos to some services. If I move the photos to my computer and open them in GIMP I see a warning message:

Corrupt JPEG data: 1130 extraneous bytes before marker 0xd9

该错误不会阻止我查看或编辑照片,但是我想知道是否存在某种方法来设置可解决此问题的批处理?

The error doesn't prevent me from viewing or editing the photos, but I'm wondering if there's some way to set up a batch process that would fix this problem?

推荐答案

没有图像就很难说出来,但是我认为ImageMagick将在没有多余数据的情况下正确地重写图像.如果您在Linux上可能已安装了该程序,请查找名为ImageMagick的名为convert和/或mogrify的程序,否则可以从此处.

It's hard to tell without an image to try it on, but I would think ImageMagick would rewrite your images properly without the superfluous data. If you are on Linux it is probably installed, look for a program called convert and/or mogrify whcih belong to ImageMagick, else you can install it from here.

然后,您需要一个对图像没有太大影响的命令,因此类似这样的操作应该是无害的:

Then you want a command that does nothing too drastic to your image, so something like this should be pretty harmless:

mogrify -set comment 'Extraneous bytes removed' *.jpg

不过请先备份文件,然后再进行测试,然后再应用到数千张图像!

Back up your files first though, and test before applying to thousands of images!

这篇关于我可以修复损坏的jpeg数据的照片吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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