在Java中将PPM转换为JPG或BMP [英] Convert PPM to JPG or BMP in java
问题描述
我需要知道用Java编写一个函数来读取ppm文件并将其转换为jpg
或bmp
格式的可行性.
有人对此有经验吗?我可以使用ImageMagick
之类的工具来实现目标,但我想以纯Java
的方式实现.
I need to know how feasible is it to write a function in java to read a ppm file and convert it to jpg
or bmp
format.
Anyone has experience with this? I am able to achieve the goal using tools such as ImageMagick
but I want to do it in pure Java
way.
推荐答案
我将搜索ImageMagick应用程序程序员接口.它们具有每种重要语言的界面.
I would search for ImageMagick Application Programmer Interfaces. They have interfaces for every significant language.
我发现Java的哲学是广泛研究已经存在的东西,找到满足您需求的最佳解决方案,然后编写与其连接所需的最少代码.这是纯Java方式.
I find the Java philosophy is to extensively research what already exists, find the best solution for your needs, then write the minimal code needed to interface to it. This is a pure Java way.
这篇关于在Java中将PPM转换为JPG或BMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!