By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,894 Members | 1,942 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,894 IT Pros & Developers. It's quick & easy.

Importing librsvg library to load a svg file

P: n/a
I need to rasterize a svg file. I'm currently trying to use an open
source library called librsvg. I have completed all the dlls and
started writing the following wrapper:

[DllImport("librsvg-2-2.dll", SetLastError=true, CharSet =
static extern IntPtr rsvg_pixbuf_from_file_at_size(string file_name,
int width, int height, out IntPtr error);

public static void LoadSvg(string fileName)
IntPtr error;
IntPtr result = rsvg_pixbuf_from_file_at_size(fileName, -1, -1, out
if (error != IntPtr.Zero)
throw new Win32Exception(Marshal.GetLastWin32Error());

However the call
causes a "The system cannot find the file specified" Win32Excpetion.
The given file exists and is a proper svg file (The GIMP loads it and
it uses the same librsvg library).

Has anyone an idea what might be the problem or at least how to debug
it? Or perhaps some of you know a .NET svg framework other than SVG#

Sep 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.