转换图像扩展名
您好,需要帮助创建一个脚本,将 tif 图像的扩展名转换为 .png 并从文件中删除原始图像。
这就是我所拥有的。 @回声关闭 图像1.tif>> image1.png
运行时将其显示为 .png 但带有空白图像。仍然不知道如何从文件夹中删除原始的。
Hi need help creating a script to convert the extension of a tif image to a .png and removing the original from the file.
This is what I have.
@echo off
image1.tif >> image1.png
when it run it show it as a .png but with a blank image. Still haven't figure out how to remove the original one from the folder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,假设 @echo off 之后应该有一个换行符:您正在做的是将运行文件 image1.tif 的进程的输出流附加到文件 image1.png (创建它如果它不存在)。由于打开 image1.tif 的程序不会向标准输出流写入任何内容,因此会创建另一个文件,但它是空的。看来您想要做的事情(无论原因是什么)是将 image1.tif 重命名为 image1.png:
或复制它:
Humm, assuming that there should be a newline after
@echo off
: What you're doing is appending the output stream from the process running the file image1.tif, to a file image1.png (creating it if it doesn't exist). As the program that opens up image1.tif doesn't write anything to the standard output stream, the other file gets created but is empty. It seems that what you want to be doing (whatever the reason is) is renaming image1.tif to image1.png:or copy it: