473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Importing librsvg library to load a svg file

Hi!
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 =
CharSet.Auto)]
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
error);
if (error != IntPtr.Zero)
{
throw new Win32Exception(Marshal.GetLastWin32Error());
}
}

However the call
RsvgWrapper.LoadSvg(@"C:\M_logo.svg");
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#
(www.sharpvectors.org)?

Sep 28 '06 #1
0 1195

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andreas Emmert | last post by:
Hi there, I'm trying to import a csv file into my MySQL database. Unfortunately the number format for the price column is formatted in German style, i.e. XX,XX (decimals separated by comma not...
0
by: Ajay Bakhshi | last post by:
Hi, I am getting the following problem on AIX. I create a small shared library. And tried to load it in python. It core dumps with the following message: Segmentation fault (core dumped) ...
29
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
0
by: st.frey | last post by:
I've got a problem with importing chinese characters into a mysql-table and have read several mailings but didn't find a solution. i have a utf-8 text file that contains chinese characters. the...
4
by: rrutkowski | last post by:
Hi! I need to rasterize a svg file in a .NET project. Currently I'm trying to use an open source library called librsvg. I've completed all the dlls and started writing the following wrapper: ...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
0
by: Tim Grove | last post by:
Any ideas why a particular dll won't load on Windows XP Pro using ctypes? The dll in question is 'librsvg-2-2.dll' (a link if anyone cares to try!!!...
0
by: Martin (gzlist) | last post by:
On 26/08/2008, Tim Grove <tim_grove@sil.orgwrote: I'm going to take a stab in the dark here and suggest it's because you have multiple (different) copies of iconv.dll on your PATH. I get...
0
by: Tim Grove | last post by:
Thanks for your advice Gerdus, but I have tried your suggestion with no success. It has at least been beneficial to discover a tool which I did not know about in 'Dependency Walker'; all...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.