SVG Converting using ImageMagick doesn't apply a translation correctly - macos

I am on a Mac using Mac OS X 10.5, and I am trying to use ImageMagick to convert an SVG file to a PNG. The problem is when I use it the rotated image doesn't show up in the correct position. If I use Batik to convert the file, it works properly.
After doing some research I found a thread that talked about trying to upgrade the SVG library. Currently, I am using ImageMagick 6.6.5 and the SVG library is 2.7.7 according to "identify -list format". The thread I found recommended using librsvg 2.32.
I have tried using port to install the updated SVG library and using port to reinstall ImageMagick. The problem and the question I have is no matter what I do with port I can't get it to use the newer version of the SVG library. It stays at 2.7.7. How do I get it to use the new library?

Unfortunately, I went down this path for a while too. After a very long time beating my head against the wall and getting fairly bruised in the process, I found the only thing that worked was inkscape. Everything else just doesn't pull it off. Unfortunately, inkscape's CLI interfaces aren't great and don't offer you nearly as much flexibility as you'd like (especially when converting to PDFs, etc), it does at least work better than everything else. To use it:
inkscape -f INPUT.SVG -e OUTPUT.PNG
See inkscape --help for aditional details.
Extra word of warning: inkscape -h actually doesn't do what you want for help and launches the GUI.

I was experiencing this on 10.7, having installed imageMagick via macPorts. After trying and failing a couple of uninstall/reinstalls with differing options. I finally uninstalled and built from source, after installing librsvg, and now everything works using the updated svg libraries.
ImageMagick's unix source and instructions are here:
http://www.imagemagick.org/script/install-source.php
ImageMagick also provides instructions on linking libraries and library paths explicitly in your configuration step (http://www.imagemagick.org/script/advanced-unix-installation.php) although I didn't have to do this.

Related

How can I install libEGL.dylib on MacOS?

I'm trying to use EGL via LWJGL on MacOS to use offscreen rendering.
It seems to throw an exception of the missing library libEGL.dylib.
I couldn't find this library on package distribution service like brew.
However, I could find several minor repositories on Github containing libEGL.dylib. I don't think this is safe to use.
How can I find the binary officially, or find the source to build?
There isn't any canonical libEGL implementation. The header files are part of the standard, but the implementation isn't.
MoltenGL has a binary download available (the second one, "OpenGL ES 2 for macOS").
If you prefer an open-source implementation, Google's ANGLE also implements EGL and supposedly supports macOS. And for what it's worth, it appears that Apple is using this in WebKit for iOS as well.

What happened to the GUI for experimenting with OpenCV?

There used to be a gui toolkit for experimenting with OpenCV image processing pipelines including code generation. I think it started with an "h". What is it called, and what happened to it?
I think I saw in the past a nice tool to test opencv functions, not so sure about the code generation.
Now i found this one, it looks decent:
http://code.google.com/p/piaf/
This one looks nice but experimental:
http://siggiorn.com/videopipe/
And these, but look poor and ancient:
http://code.google.com/p/cvpreprocessor/
http://code.google.com/p/open-rtvision/
EDIT:
This one is dedicated to feature detecting module:
http://introlab.github.io/find-object/
I think you refer to Harpia. It's available in Ubuntu applications if you enter OpenCV in SW repository (Ubuntu Software Center) search box
This is called HighGUI. You can find many docs in the web. Here's one of them: Load and Display an Image.

Haskell GUI library on OSX

I want to create a GUI application on OSX with Haskell. It mainly should be about drawing on a canvas. I tried the following options but none of them worked:
WX. It doesn't work well because of dependency on obsolete quicktime version. I can't compile with it and can't use it in ghci.
Gtk2hs. It involves very complicated install process which fails for me with homebrew (I tried the sequence on haskell.org wiki but it didn't work for me probably because of OSX10.8).
Are there any other options?
If you're just drawing 2D shapes on a canvas, you could try gloss.

Annotate images using tools built into OS X

I want to overlay text on images on OS X, preferably without installing additional software, so that, as a sysadmin, I can know at a glance that machines are up-to-date, in a way that is easily scriptable and easily modifiable, and can run without GUI access. [Being able to overlay images or apply color-changing effects would be a bonus.]
Mac OS X Leopard comes with a ton of stuff built-in: Perl, Python, Ruby, Tcl/Tk, Bash; wxWidgets, some Quartz integration, and even Objective-C integration for Python and Ruby. There must be several good ways to do this, if I were only versed in these systems.
I'm continuing to go through the examples in the /Developer folder on my computer, and I have got a partial idea of how this might be done in Cocoa and converted to PyObjC. I decided I would have to deploy ImageMagick, but in my testing, I am running into an infamous bus error, and would prefer not to have to compile ImageMagick or GraphicsMagick with all its dependancies if I can do what I need to out-of-the-box. [That said, I would consider installing additional components, but it would be a big win to have something that would work on a stock install of OS X].
This seems like it'd be relatively simple to do using Python and the Python Imaging Library (PIL). I don't think PIL is installed with OS X by default, but it's relatively easy to install manually and doesn't have a ton of dependencies. The PIL tutorials are also pretty good -- it shouldn't be too hard to whip up a command-line or GUI program to do what you want.
CocoaMagic is a single-file replacement for large parts of RMagick (Ruby integration with ImageMagick or GraphicsMagick). It should be useable as a library in its own right, or by appending things to the bottom of the script.

C++ Cross Platform Image Loader for OpenGL

I have tried everything from SDL to DevIL, and they have all failed for various reasons.
SDL segfaults for various reasons, and DevIL is having some weird problem where even after i include IL/ilut.h and linking everything, and including the other headers, it is not defining the functions i need to load images into opengl textures (something about USE_OPEN_GL not being defined). I am asking for any other lib out there for loading bitmaps or png's into a format i can easily convert to opengl, or a solution to the devil problem.
thanks
Both libpng and libjpeg can be rather daunting to build & use -- no wonder there are all sorts of wrapper libraries for both.
A very simple and minimal no-nonsense loader for jpg/png (and some other stuff aswell) without dependencies in a single C file is Sean Barrett's stb_image.c, if you just want to load some image files it adds absolutely minimal overhead to your program and is straightforward to use:
http://nothings.org/stb_image.c
As Adam suggests, I would also recommend to use libpng and libjpeg. You are not specifying if you write in C or C++, but if in C++, then I'd suggest to take a look at two handy thin wrappers on the both libraries: pngxx and jpegxx
LodePNG is a highly compact PNG Loader with no dependencies.
Comment on your experience with DevIL - it works flawlessly for me and many others. Why not try again to resolve your build problems? - shouldn't be too hard)
You can also try FreeImage library. It supports loading different image types and is functionally similar to DevIL, may work out of the box for you.
And about your problem with DevIL, you do not have to build ilu or ilut libraries to make DevIL functional. I would recommend you manage the OpenGL texture objects yourself, including uploading image data to OpenGL side.
SOIL is a decent lightweight one I've used before. It's actually specialized for loading OpenGL textures too.
http://lonesock.net/soil.html
you dont need ILUT to do what you want. you can simply use ilGetData() and glTexImage2d()
Loading bitmaps (.bmp) and netpbm images (.pbm, pgm, .pnm) is fairly trivial, since they store images uncompressed. For loading PNGs, use libpng. For loading JPEGs, use libjpeg. For other image types, use an appropriate library. There's a good change that slapping on 'lib' to the beginning of the image name will give you such a library, e.g. libtiff, libtga, etc.
Once you've loaded and uncompressed the raw image data, loading it into an OpenGL texture is just a matter of calling glTexImage2D() with the right parameters, and a couple of other GL state changes (e.g. how to do mipmapping).
Image Magick with either the C or C++ bindings?
http://www.imagemagick.org/script/index.php
Young but yet great enough SFML could be the one you're searching for. I've used it for numerous projects and all of 'em worked well on all my platforms (Win7 and Ubuntu).

Resources