how to use the units -no information about this lazarus / 21-General ---------------------------------------------------------------------- alaa123456789 · 2022-01-13 16:09 Hi All, in source menu we can add units to uses section but for most of the units there is no information how to use it could anyone help us ,where to find these information and how can we use these units in our programs. thanks ---------------------------------------------------------------------- Thaddy · 2022-01-13 16:46 If the units are seemingly undocumented, the sourcecode itself is the documentation. And FPC comes with all sourcecode for all packages and all units (100%). Often Google fpc is enough if you are really stuck. Or the wiki. Note it is not an ideal world, many units indeed lack outside documentation, but members of this forrum usually come up with examples when you ask a specific question about a specific unit. ---------------------------------------------------------------------- alaa123456789 · 2022-01-13 17:04 thanks Thaddy for quick reply , yes true a lot of units have no information about using it , but is there any method or a way to learn about units , for example you have mentioned the source code itself but i think it is complicated for new person to figure out how to convert it to a sample thanks ---------------------------------------------------------------------- Thaddy · 2022-01-13 17:31 Well, just ask on the forum... If a unit is unclear to you, there are ions of experience available here and beginners will never be ignored.. Often the people who wrote such a unit in the first place are here as well. ---------------------------------------------------------------------- speter · 2022-01-13 23:14 alaa123456789 are you asking:   (a) how do I add units to my application(s)? or   (b) how do I use the units included with fpc &/or lazarus? If (b) then I'd recommend what Thaddy wrote (ask the forum; usually about a particular function, procedure or component); if (a) then have a look at chapter 16 in the fpc pascal reference guide (https://www.freepascal.org/docs-html/ref/ref.html). There are also numerous (PDF) books that give information about (a) and (b). cheers S. ---------------------------------------------------------------------- alaa123456789 · 2022-01-14 10:46 Quotealaa123456789 are you asking:   (a) how do I add units to my application(s)? or   (b) how do I use the units included with fpc &/or lazarus? hi , i am asking about using units (which in lazarus as well in fpc folder) , could you please share if there is a books descripting the units with examples . for example @ Thaddy , RSVG unit how to use it to show svg file on the form thanks ---------------------------------------------------------------------- dbannon · 2022-01-14 11:19 Its often useful to search both the wiki and the forum, I just found a number of potential useful hits doing just that, 'svg'. There is an example buried down in your Lazarus dir that talks about displaying an SVG in a PDF, I'd expect the process would be somewhat similar. components/cairocanvas/example/cairoprog.lpr Give those a try and come back with specific questions here if necessary. Generally, specific questions that start with "I tried XXX but YYY happened" get some pretty answers ! Davo ---------------------------------------------------------------------- alaa123456789 · 2022-01-14 12:02 THE SPECIFIC QUESTION IS THIS QuoteRSVG unit how to use it to show svg file on the form OR TIMAGETHE CAIRO EXAMPLE SHOW ONLY HOW TO PRINT OUT FILE AS SVG THANKS ---------------------------------------------------------------------- speter · 2022-01-14 23:29 Quote from: alaa123456789 on January 14, 2022, 01:02:45 pmTHE SPECIFIC QUESTION IS THIS QuoteRSVG unit how to use it to show svg file on the form OR TIMAGETHE CAIRO EXAMPLE SHOW ONLY HOW TO PRINT OUT FILE AS SVG THANKS Have a look at https://forum.lazarus.freepascal.org/index.php?topic=36910.0 (it came up from a google search for "lazarus svg". It does not use "RSVG" though (it uses BGRABitmap). cheers S. ---------------------------------------------------------------------- dbannon · 2022-01-15 00:34 Quote from: alaa123456789 on January 14, 2022, 01:02:45 pmTHE SPECIFIC QUESTION IS THIS QuoteRSVG unit how to use it to show svg file on the form OR TIMAGE.... Are you aware that all caps is regarded as shouting ?  I'll assume you are not so aware. My post suggested you search the wiki and forum before asking you specif question. Did you ? In the forum, I found over 200 hits for 'svg', a small number are likely to hold the key to your problem. Did you look through them ?  Pick out one or two that looked promising, maybe mention the ones you tried out. Then you could format your question in the manner I suggested. Davo ---------------------------------------------------------------------- engkin · 2022-01-15 03:09 Quote from: alaa123456789 on January 14, 2022, 11:46:52 amRSVG unit how to use it to show svg file on the form rsvg is a partial header for librsvg,  version 2 specifically. I found version 2.2 on my laptop, inside GIMP binary folder. Made a copy of rsvg file into a new project folder and changed the name of the library to match the one I have. I also defined DYNLIB to get it to work with the dll. I found the man pages for librsvg, not long after that I did a quick test: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses...  ,rsvg  ,gdk2pixbuf;...procedure Test_rsvg(fn:string; Canvas:TCanvas);var  e:PGError;  h:PRsvgHandle;  buf:PGdkPixbuf;  channels,bits_per_sample,width,height,rowstride:LongInt;  colorspace:TGdkColorspace;  alpha:boolean32;  pixels:Pguchar;  y,x:integer;  pb:PByte;begin  rsvg_init;   //read a file  h:=rsvg_handle_new_from_file(pchar(fn),e);  if h=nil then  begin    LogLn('rsvg_handle_new_from_file: ',e^.message);    exit;  end;   //Get pix  buf:=rsvg_handle_get_pixbuf(h);   //Get pix info  colorspace:=gdk_pixbuf_get_colorspace(buf);  channels:=gdk_pixbuf_get_n_channels(buf);  alpha:=gdk_pixbuf_get_has_alpha(buf);  bits_per_sample:=gdk_pixbuf_get_bits_per_sample(buf);  pixels:=gdk_pixbuf_get_pixels(buf);  width:=gdk_pixbuf_get_width(buf);  height:=gdk_pixbuf_get_height(buf);  rowstride:=gdk_pixbuf_get_rowstride(buf);   //Draw pix  pb:=pixels;  for y:=0 to height-1 do  begin    for x:=0 to width-1 do    begin    Canvas.Pixels[x,y]:=RGBToColor((pb+0)^,(pb+1)^,(pb+2)^);      inc(pb,4);    end;  end;   //clean up  rsvg_handle_close(h,e);  rsvg_term;end; This to get you started. I tried it on one file and it seems right. ---------------------------------------------------------------------- Thaddy · 2022-01-15 06:09 Also have a look at the language reference guide: https://www.freepascal.org/docs- html/current/ref/refse112.html#x233-25700016.2 And tis https://www.thoughtco.com/anatomy-of-delphi-unit-for-beginners-4091943 Note that is for delphi but covers FPC too. *.dpr  equals *.lpr. The unit parts work out of the box in {$mode delphi} ---------------------------------------------------------------------- alaa123456789 · 2022-01-15 11:33 Quote from: dbannon on January 15, 2022, 01:34:19 amQuote from: alaa123456789 on January 14, 2022, 01:02:45 pmTHE SPECIFIC QUESTION IS THIS QuoteRSVG unit how to use it to show svg file on the form OR TIMAGE.... Are you aware that all caps is regarded as shouting ?  I'll assume you are not so aware. i don't like to argue with you about capital and small letter meaning, but i never been mean to anyone thanks for your advise , the topic is how to use the units as i said for example Rsvg but there are many units is not having information , i know about bgra component , but to learn how to use the units with ide,fpc is much better and useful thanks ---------------------------------------------------------------------- dbannon · 2022-01-15 11:51 Quote from: alaa123456789 on January 15, 2022, 12:33:33 pm...... but there are many units is not having information Yes, I agree. The "getting a first start" information is missing in a lot of places. I have been trying to get some interest in indexing and documenting the existing set of examples (there are well over 200 but hard to find the one you want) in https://forum.lazarus.freepascal.org/index.php/topic,57680.0.html but sadly I am not seeing any interest and will abandon the idea tomorrow. Quote from: alaa123456789 on January 15, 2022, 12:33:33 pm.... i know about bgra component , but to learn how to use the units with ide,fpc is much better and useful bgra is  FPC just as much as Rsvg is. And probably bgra is more widely used and better supported.  I have only used it once in a small tryout that I abandoned because I was disturbed about how much it enlarged my binary. But it was definitely quite easily used with a most things fairly obvious. Given, as I said, its widely used, heavily discussed and under active development, might be a good choice. Davo ---------------------------------------------------------------------- SymbolicFrank · 2022-01-15 11:57 typing the function name and pressing F1 helps if you have the help installed. Otherwise, first google to find which function you need (mostly fro the forum here) and then google for that function name to see in which unit it resides. It's advisable to do that anyway if you're not sure, because things get added and move around. Like, the units that hold the same functions, but for UTF-8, or functions that don't rely on Windows, etc. I tend to google first if I think something is difficult and could be much simpler, before I use the complex one or build it myself. ---------------------------------------------------------------------- alaa123456789 · 2022-01-15 12:02 Quote from: engkin on January 15, 2022, 04:09:10 amQuote from: alaa123456789 on January 14, 2022, 11:46:52 amRSVG unit how to use it to show svg file on the form This to get you started. I tried it on one file and it seems right. Thanks engkin for your help , i tried your code please have a look on attached files ,i had errors i am using lazarus on windows thanks ---------------------------------------------------------------------- dbannon · 2022-01-15 12:15 You clearly have some required units not mentioned in the Uses clauses. PGError You also seem to have declared variables called Width and Height, but TForm1 being a form, will have its own Width and Height declared, use other names. Pugchar is also probably a type declared in another unit you need to add to Uses. Hopefully, the code, not shown in your image will give you a clue about just what those extra units are. Maybe a text search just above where your extra units are installed will help ? grep -rni PGError Davo ---------------------------------------------------------------------- alaa123456789 · 2022-01-15 12:45 Quote from: dbannon on January 15, 2022, 01:15:31 pm Hopefully, the code, not shown in your image will give you a clue about just what those extra units are. Maybe a text search just above where your extra units are installed will help ? grep -rni PGError Davo the code is done by engkin and it is attached , please download and have a look on it QuoteYou also seem to have declared variables called Width and Height, but TForm1 being a form, will have its own Width and Height declared, use other names. Pugchar is also probably a type declared in another unit you need to add to Uses. how we will know where is source unit for this ? thanks ---------------------------------------------------------------------- dbannon · 2022-01-15 12:59 Attached ?  I don't see your code attached and its different from what engkin posted earlier (at least in that you have put function into the TForm1). Did you use the   " ,rsvg  ,gdk2pixbuf; " that engkin mentioned ?  I doubt that he would have posted without testing, his work is good. Its midnight here, i will be back tomorrow if engkin has not sorted it out by then.... Davo ---------------------------------------------------------------------- alaa123456789 · 2022-01-15 13:05 Quote from: dbannon on January 15, 2022, 01:59:15 pmAttached ?  I don't see your code attached and its different from what engkin posted earlier (at least in that you have put function into the TForm1) Davo QuoteDid you use the   " ,rsvg  ,gdk2pixbuf; " that engkin mentioned ?  I doubt that he would have posted without testing, his work is good. yes same i didnt change anything except i added the procedure to form to use it later in button click ,please see the snip for where i attached the code thanks ---------------------------------------------------------------------- engkin · 2022-01-15 14:58 Sorry for the trouble I caused. While testing, Lazarus added the variables and their units automatically. Attached is my test. Notice that I intentionally left the console open as it displayed messages about not found font and the replacement font used...etc. NOTE: Remove .jpg from the extension, had to add it to please my phone. ---------------------------------------------------------------------- alaa123456789 · 2022-01-15 16:13 Quote from: engkin on January 15, 2022, 03:58:22 pmSorry for the trouble I caused. While testing, Lazarus added the variables and their units automatically. Attached is my test. Notice that I intentionally left the console open as it displayed messages about not found font and the replacement font used...etc. NOTE: Remove .jpg from the extension, had to add it to please my phone. thanks engkin ,still not working please see photos thanks ---------------------------------------------------------------------- engkin · 2022-01-15 19:13 Your best bet is to replicate my test. I ran it inside GIMP (I believe it was version 2.0). ---------------------------------------------------------------------- BobDog · 2022-01-15 20:24 I don't use the Lazarus ide, but usually Geany. I give the command line to Geany FT_00_CM=fpc "%f" -FuC:\\Users\\Computer\\Desktop\\units64 -S2 -Sg -Un -O3 -Op2 As you see I keep a folder units64 on my desktop. I copy the unit files from the fpc distro and pop them in this folder when needed. (.ppu and .o) I dont really bother with TForm1 e.t.c., If I need graphics I can use the graph unit or gdi graphics on the console. ---------------------------------------------------------------------- dbannon · 2022-01-15 23:13 engkin's recent code worked fine for me. I had to do three things - 1. In rsvg, there is an ifdef Windows that sets DYNLINK, but just under it there is another line that defines DYNLINK irrespective of using Windows or not. I am using Linux and needed to comment out the unilateral define. 2. I installed librsvg-dev 3. engkin's code, in unit1, pointed to a specific svg file I did not have. So I copied the powered-by.svg from my Lazarus src to this project's working dir and edited engkin's code accordingly. It then compiled OK and ran. Initially, I had a just a black window, but realised it was a positioning thing, if I expanded the window, down, there was our familiar logo. Now, point 1 and 2 are Linux specific but hint that you must have the "SAX renderer" library installed, in Windows I guess thats a DLL. I don't know how DLL's work so don't know if you also need the headers. The third point is just about putting a suitable svg file somewhere where the app can find it. engkin's code does not test for it apparently. engkin's code also uses writeln, I'm guessing that means something he has done lets writeln write to a "consol" even though its Windows, way, way beyond my Windows experience, I'd expect that writeln to crash the app. (but I'd like to know how to do that, I do not understand how anyone can develop code without  a console to drop messages to.) Overall, with its heavy dependencies on libraries, appears to me that BGRA is still a better option. EDIT: Getting back to your question, how to use Units ? Your initial try objected to a missing PGError and Pugchar, they are found when you include "glib2" up around line 30 of Unit1.  enjkin also seems to have used "Variants", looks unnecessary to me. EDIT2: Err, am I missing something here ?  All these GTK calls, unit dependencies etc. How are they going to work on Windows ?  It is possible to install GTK2 on Windows but why would you ?   This looks like Linux only code to me. Davo ---------------------------------------------------------------------- engkin · 2022-01-16 05:48 Quote from: dbannon on January 16, 2022, 12:13:32 amThe third point is just about putting a suitable svg file somewhere where the app can find it. engkin's code does not test for it apparently. It was a quick test, meant to give a starting point. Quote from: dbannon on January 16, 2022, 12:13:32 amengkin's code also uses writeln, I'm guessing that means something he has done lets writeln write to a "consol" even though its Windows, way, way beyond my Windows experience, I'd expect that writeln to crash the app. (but I'd like to know how to do that, I do not understand how anyone can develop code without  a console to drop messages to.) For Windows, find it in: Project Options   Compiler Options     Config and Target       Win32 gui application <==== remove the checkmark Quote from: dbannon on January 16, 2022, 12:13:32 amenjkin also seems to have used "Variants", looks unnecessary to me. To display the results of gdk_pixbuf_get_* calls, but did not need it as the format was described in the unit gdk2pixbuf near the type of variable colorspace. And a few lines of Writeln were good enough. Quote from: dbannon on January 16, 2022, 12:13:32 amEDIT2: Err, am I missing something here ?  All these GTK calls, unit dependencies etc. How are they going to work on Windows ?  It is possible to install GTK2 on Windows but why would you ?   This looks like Linux only code to me. There are good libraries that need GTK to run on Windows. GIMP comes with GTK, probably because it uses GTK dependant libs. Using a TImage instead of Canvas: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses...,GraphType; procedure Test_rsvg(fn:string; AImage:TImage);var...  LRawImg:TRawImage; //unit GraphTypebegin...  //Draw pix  LRawImg.Init; //LRawImg is a TRawImage from unit GraphType  LRawImg.Description.Init_BPP32_R8G8B8A8_BIO_TTB(width,height);  LRawImg.Data:=pixels;  LRawImg.DataSize:=width*height*4;   AImage.Width:=width;  //AImage is a TImage  AImage.Height:=height;  AImage.Picture.Bitmap.LoadFromRawImage(LRawImg,false);...end; ---------------------------------------------------------------------- dbannon · 2022-01-16 06:33 certainly not criticizing engkin, far from it !  Just trying to clarify things for our friend alaa123456789. He is on Windows so might struggle with those GTK libraries. But I am not much help at all on Windows issues. Last time I used Windows for any more than an hour at a time was on Windows98 ! Now, that extra code you posted, it replaces the GTK dependent stuff ?  But he will still need a rsvg dll ? Thanks for that tip engkin about windows console, will try that next time I am debugger there ! I hate not having a console. Davo ---------------------------------------------------------------------- engkin · 2022-01-16 16:49 Quote from: dbannon on January 16, 2022, 07:33:30 amcertainly not criticizing engkin, far from it !  Just trying to clarify things for our friend alaa123456789. Don't hesitate to criticize. I miss Taazz, he used to do that frequently. Quote from: dbannon on January 16, 2022, 07:33:30 amHe is on Windows so might struggle with those GTK libraries. But I am not much help at all on Windows issues. Last time I used Windows for any more than an hour at a time was on Windows98 ! Now, that extra code you posted, it replaces the GTK dependent stuff ?  But he will still need a rsvg dll ? No, it will not replace GTK. It is just a faster way to draw the svg file on a TImage instead of using the TCanvas of the form. ---------------------------------------------------------------------- alaa123456789 · 2022-01-16 17:12 QuoteUsing a TImage instead of Canvas: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses...,GraphType; procedure Test_rsvg(fn:string; AImage:TImage);var...  LRawImg:TRawImage; //unit GraphTypebegin...  //Draw pix  LRawImg.Init; //LRawImg is a TRawImage from unit GraphType  LRawImg.Description.Init_BPP32_R8G8B8A8_BIO_TTB(width,height);  LRawImg.Data:=pixels;  LRawImg.DataSize:=width*height*4;   AImage.Width:=width;  //AImage is a TImage  AImage.Height:=height;  AImage.Picture.Bitmap.LoadFromRawImage(LRawImg,false);...end;thanks engkin,but could you please complete example because it is like solving a puzzle when i am trying to try your code always have an issue this time stopped on "pixels" not defined type we are just beginner to figure out this type to which unit belong it really hard thanks ---------------------------------------------------------------------- engkin · 2022-01-16 21:11 Quote from: alaa123456789 on January 16, 2022, 06:12:49 pmthanks engkin,but could you please complete example because it is like solving a puzzle when i am trying to try your code always have an issue this time stopped on "pixels" not defined type we are just beginner to figure out this type to which unit belong it really hard No problem, just drop a button and an image on a form and here is the source code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs,StdCtrls,ExtCtrls; type   { TForm1 }   TForm1 = class(TForm)    Button1:TButton;    Image1:TImage;    procedure Button1Click(Sender:TObject);  private  public  end; var  Form1: TForm1; implementation {$R *.lfm} uses   rsvg  ,glib2  ,gdk2pixbuf   ,GraphType  ; procedure Test_rsvg(fn:string; AImage:TImage);var  e:PGError;  h:PRsvgHandle;  buf:PGdkPixbuf;  channels,bits_per_sample,width,height,rowstride:LongInt;  colorspace:TGdkColorspace;  alpha:boolean32;  pixels:Pguchar;  LRawImg:TRawImage;begin  rsvg_init;   //read a file  h:=rsvg_handle_new_from_file(pchar(fn),e);  if h=nil then  begin    WriteLn('rsvg_handle_new_from_file: ',e^.message);    exit;  end;   //Get pix  buf:=rsvg_handle_get_pixbuf(h);   //Get pix info  colorspace       := gdk_pixbuf_get_colorspace(buf);  channels         := gdk_pixbuf_get_n_channels(buf);  alpha            := gdk_pixbuf_get_has_alpha(buf);  bits_per_sample  := gdk_pixbuf_get_bits_per_sample(buf);  pixels           := gdk_pixbuf_get_pixels(buf);  width            := gdk_pixbuf_get_width(buf);  height           := gdk_pixbuf_get_height(buf);  rowstride        := gdk_pixbuf_get_rowstride(buf);   WriteLn('colorspace      : ', colorspace     );  WriteLn('channels        : ', channels       );  WriteLn('alpha           : ', alpha          );  WriteLn('bits_per_sample : ', bits_per_sample);  WriteLn('width         : ', width          );  WriteLn('height          : ', height       );  WriteLn('rowstride       : ', rowstride      );   //Draw pix  LRawImg.Init; //LRawImg is a TRawImage from unit GraphType  LRawImg.Description.Init_BPP32_R8G8B8A8_BIO_TTB(width,height);  LRawImg.Data     := pixels;  LRawImg.DataSize := width*height*4;   AImage.Width     := width;  //AImage is a TImage  AImage.Height    := height;  AImage.Picture.Bitmap.LoadFromRawImage(LRawImg,false);   //clean up  rsvg_handle_close(h,e);  rsvg_term;end; { TForm1 } procedure TForm1.Button1Click(Sender:TObject);begin  Test_rsvg('logo.svg',Image1);end; end. Make sure to get the console window by: QuoteProject Options   Compiler Options     Config and Target       Win32 gui application <==== remove the checkmark I did some more tests and this library, librsvg-2-2, fails with some files. At this point you better use something else, or if you insist try to get a newer version. The one I have is over 10 years old. But again, I don't see the point. Either way when you test the code, try to use a simple svg file. ---------------------------------------------------------------------- engkin · 2022-01-16 21:18 Quote from: jamie on January 16, 2022, 07:40:32 pmThe DATA is a Pbyte pointer that points to a block of memory.. In this case it is assumed you have that block of memory somewhere that represents the image format that is been specified a couple lines prior.  The actions merely set's up this object so that the following code will use a valid set of data to load from your block of data you point it to via the DATA pointer of this object. Notice the size too, it too must represent at least enough space, too.  This all means that somewhere you must already have an image that is raw memory that needs only to be pointed to..  The PIXELS here is just a foot note for you understand it must be assigned from a valid pointer that points to your pixels or at least an valid address of. Impressive. ---------------------------------------------------------------------- jamie · 2022-01-16 23:01 Quote from: engkin on January 16, 2022, 10:18:52 pmQuote from: jamie on January 16, 2022, 07:40:32 pmThe DATA is a Pbyte pointer that points to a block of memory.. In this case it is assumed you have that block of memory somewhere that represents the image format that is been specified a couple lines prior.  The actions merely set's up this object so that the following code will use a valid set of data to load from your block of data you point it to via the DATA pointer of this object. Notice the size too, it too must represent at least enough space, too.  This all means that somewhere you must already have an image that is raw memory that needs only to be pointed to..  The PIXELS here is just a foot note for you understand it must be assigned from a valid pointer that points to your pixels or at least an valid address of. Impressive. That's exactly what my father said the moment I came into this world "Impressive". He wasn't aware that he could create such perfection ! Later on in life he started questioning that moment on that glorious day and would ask himself from time to time, " Did I really do that"? ---------------------------------------------------------------------- engkin · 2022-01-16 23:07 Lol, get out of here. ---------------------------------------------------------------------- 440bx · 2022-01-16 23:14 Quote from: jamie on January 17, 2022, 12:01:03 amThat's exactly what my father said the moment I came into this world "Impressive". He wasn't aware that he could create such perfection ! Later on in life he started questioning that moment on that glorious day and would ask himself from time to time, " Did I really do that"? I didn't know Thaddy was your father ---------------------------------------------------------------------- dbannon · 2022-01-16 23:17 Quote from: 440bx on January 17, 2022, 12:14:01 am..... I didn't know Thaddy was your father Here, I'll do it for you Thaddy. ---------------------------------------------------------------------- 440bx · 2022-01-16 23:25 Quote from: dbannon on January 17, 2022, 12:17:12 amQuote from: 440bx on January 17, 2022, 12:14:01 am..... I didn't know Thaddy was your father Here, I'll do it for you Thaddy.                   I'm glad you did that for him... every time he gets grumpy, I worry he is damaging his perfection but, he normally uses the little red devils with the pitch fork... you missed the pitch fork... you gotta correct that or he might grumpy at you for not getting it right   he seems  quite attached to his pitch fork. ---------------------------------------------------------------------- dbannon · 2022-01-17 04:29 Strewth, I'd rather not risk that. Last time he got mad at me he called me a Windows User, still has not apologized .... For Thaddy -          (Seriously, Thaddy, we appreciate you knowledge, we really do !) ---------------------------------------------------------------------- PascalDragon · 2022-01-17 12:29 Everyone, please, would you please come back to the topic of the thread? I'd say that alaa123456789 would appreciate that as well. ---------------------------------------------------------------------- alaa123456789 · 2022-01-18 19:04 Quote from: engkin on January 16, 2022, 10:11:55 pm I did some more tests and this library, librsvg-2-2, fails with some files. At this point you better use something else, or if you insist try to get a newer version. The one I have is over 10 years old. But again, I don't see the point. Either way when you test the code, try to use a simple svg file. hi engkin , yes it failed here are all the errors QuoteCompile Project, Target: project1.exe: Exit code 1, Errors: 5 project1.lpr(24,1) Error: Undefined symbol: rsvg_init project1.lpr(24,1) Error: Undefined symbol: rsvg_handle_new_from_file project1.lpr(24,1) Error: Undefined symbol: rsvg_handle_get_pixbuf project1.lpr(24,1) Error: Undefined symbol: rsvg_handle_close project1.lpr(24,1) Error: Undefined symbol: rsvg_term thanks for your time ---------------------------------------------------------------------- engkin · 2022-01-18 21:46 Give fpvectorial a try.