如何在 Windows 上下载、编译和执行简单的 ImageMagick (++)
除了学习图形库 API 之外,没有什么特殊原因,我决定尝试一下 ImageMagick。我想我会下载一个 DLL 和一个头文件 (*.h),然后创建一个使用此头文件并链接到 DLL 的 C++ 程序。
现在的问题是:我没有找到这样的头文件。
我发现 ftp://ftp.imagemagick.org /pub/ImageMagick/binaries/ImageMagick-6.6.7-Q16-windows.zip 包含一些 DLL 和 EXE,但没有头文件。
另一方面,在 http://image_magick.veidrodis.com/image_magick/windows/我发现了一些 zip 文件,其中充满了头文件,但没有任何 DLL。如果我编译这样一个 zip 文件中包含的树,我可能可以创建这样一个 DLL,但由于我不知道我是否会喜欢 ImageMagick,所以我宁愿不这样做,特别是因为我在 Windows 上整个构建过程似乎是为 Unix 变体而设计的。
简而言之,我的问题可能归结为:是否有可能在 C++ 或 C 中创建一个简单 ImageMagick“应用程序”,它的最低要求是什么,以及我从哪里可以获得它们。
编辑:根据评论,我尝试了MagicWand C API
编辑:也许 ImageMagick 对于我的目的来说太大了,而且它并不像我希望的那么简单。在这种情况下,我很高兴看到任何指向其他图形库的指针,这些图形库可以做的不仅仅是直线和圆形。
For no particular reason other than to learn a graphic library API I decided to give ImageMagick a try. I thought I'd be downloading a DLL along with a header file (*.h) and then create a c++ program that uses this header file and links against the DLL.
Now, the problem is: I didn't find such a header file.
I found ftp://ftp.imagemagick.org/pub/ImageMagick/binaries/ImageMagick-6.6.7-Q16-windows.zip that contains a few DLLs and EXEs, but no header file.
On the other hand, at http://image_magick.veidrodis.com/image_magick/windows/ I found a few zip files that are full of header files, but without any DLL. I could probably create such a DLL if I compiled the the tree contained in such a zip file, but since I don't know if I am going to like ImageMagick, I'd rather not do that, especially since I am on windows and the entire build process seems to be made for a Unix variant.
In short, my question probably boils down to: is there a possibility to create a simple ImageMagick "application" in c++ or c, and what are the minimal requirments for it, and where would I get them.
Edit: As per a comment, I have tried the MagicWand C API http://www.imagemagick.org/script/magick-wand.php
I can compile the c source file, but I cannot link it because of undefined references to MagickWandGenesis, NewMagickWand, MagickReadImage, MagickGetException, MagickRelinquishMemory, MagickResetIterator, MagickResizeImage, MagickNextImage, MagickWriteImages, MagickGetException, MagickRelinquishMemory, DestroyMagickWand and MagickWandTerminus. And it's these symbols that I thought I'd find in a DLL.
Edit: maybe ImageMagick is just too big for my purposes and it is not as simple as I'd like it to be. In this case, I'd be happy for any pointer towards other graphic libraries that can do a bit more than just straight lines and circles.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们需要了解您的要求才能为任何图像处理库提供建议。有许多具有不同功能:OpenCV、libpng, libjpeg 、GIL 等等。
也可能您需要的只是一个本机 Windows 库,例如 GDI、GDI+ 或 DirectX(Direct3D 或 Direct2D)
we need to know your requirements to advise any image processing library. there're many with different capabilities: OpenCV, libpng, libjpeg, GIL and so on.
also probably what you need is just a native Windows library like GDI, GDI+ or DirectX (Direct3D or Direct2D)