用于图像压缩的Windows命令返回无效参数错误

时间:2016-07-28 06:28:38

标签: windows image command-line cmd compression

我正在尝试运行以下命令来压缩Windows系统上的图像文件大小,并返回错误消息:

  

无效参数70

You can encode the data array into json and return to the jquery script as follows:

$data=database query return result set;
json_encode($data);

in jquery code (inside script) just use the get method with the url of the page..
$getJSON('url',function(data){
  for(var i=0;i<data.length;i++){
   $('table tbody').append('<tr>');
   $('table tbody').append(data[i].id); // same as other columns you want to append
   $('table tbody').append('</tr>');
}
});

and in html code just create a simple html code for table with column names.

我尝试在万维网上搜索解决方案,但找不到任何内容。

命令的语法是错误的吗?

OR

这根本不起作用吗?

我在这里缺少什么?

1 个答案:

答案 0 :(得分:1)

您必须指定convert命令的完整路径(例如:如果您在convert.exe循环中安装C:\myprogsC:\myprogs\convert.exe提供for,或DOS将使用内置的convert命令,这是完全不同的(NTFS / FAT卷转换)

在我的机器上(我还没有安装任何convert程序):

C:\Users\xxxx>where convert
C:\Windows\System32\convert.exe

内置的Windows命令始终位于PATH中。

稍微偏离主题来解释类似的问题:当人们尝试在Windows命令行中调用MSYS findsort或通用命名命令时。其他命令(如sedgrep)运行正常,因为它们不存在于MS-DOS中,但Windows findsort存在并且首先存在,除非从MSYS2 shell(更不用说:由于命令含义和语法不同,用户的脚本失败了)

正如其他评论中所见,我认为你正在混淆compact命令。 compact命令是一个压缩程序,不太可能有效地打包您的图像。你真的需要ImageMagik包。 Irfanview不是一个命令行工具,但有一个很好的批处理模式,效果很好。