Overview of Graphics. lazarus / 39-Graphics ---------------------------------------------------------------------- sean_vn · 2014-07-24 06:04 What I'm missing is a global overview of how to do graphics in Lazarus/FP.  I had a similar problem with the IUP GUI library in C.  I have no doubt that the IUP library is very good, and there is a lot of information about how about specific items in the library work.  There is no information about how to put the pieces together, nor information about the overall conceptual basis to allow you understand how to fit everything together.  If that information was available I wouldn't be using FP now.  I am finding FP more integrated and easier to use however I am having a similar problem to IUP using graphics.  All I need to do is load, rescale, crop some images and then get the data out.  I don't have a handle on the conceptual structure of TImage and its various subcomponents.  The waters are also muddied by the fact that there are multiple graphics libraries and what exactly is provide with Lazarus/FP and what is external.  1/ What is available in Lazarus/FP only? 2/ How are those items put together to get functionality? ---------------------------------------------------------------------- BigChimp · 2014-07-24 06:08 Have you seen http://wiki.lazarus.freepascal.org/Developing_with_Graphics There's also examples in your Lazarus directory that show use of TImage etc. ---------------------------------------------------------------------- sean_vn · 2014-07-24 06:20 I'll try drawing out the information on that page and see if I can figure out how things are connected and sequenced.  I'd still prefer to understand the reasoning behind it.  I am sure I will be able to do the things I need to do.  I think the Brazilian authors of IUP maybe found it difficult to explain the conceptual basis of their work in English.  It's a pity because it seems like good library with solid cross platform capabilities.  I just could not get a handle on it. ---------------------------------------------------------------------- avra · 2014-07-24 06:41 Quote from: sean_vn on July 24, 2014, 08:04:50 amWhat I'm missing is...Your topic was misleading. Please use more clear topic in the future. ---------------------------------------------------------------------- marcov · 2014-07-24 07:33 Moderator note: I agreed with Avra, so I adapted the title. If you have enormous problems with that please send me a pm and I'll change it back ---------------------------------------------------------------------- BigChimp · 2014-07-24 07:38 Quote from: sean_vn on July 24, 2014, 08:20:57 amI think the Brazilian authors of IUP maybe found it difficult to explain the conceptual basis of their work in English.  It's a pity because it seems like good library with solid cross platform capabilities.  I just could not get a handle on it. I'm having trouble understanding what a C library has to do with graphics in Lazarus which uses Object Pascal? Being a graphics newbie myself, I was happy with using the (external) imagemagick using the imagemagick bindings that come with FPC. Imagemagick can handle some image formats (e.g. some TIFF formats like CCIT group 4 fax compressed images) FPC cannot.... and it is a fair bit quicker (the FPC code is primarily coded for correctness and maintainability though speed improvement fixes are made) See e.g. http://wiki.lazarus.freepascal.org/PascalMagick There are, as you indicated, many other graphics libraries... ---------------------------------------------------------------------- sean_vn · 2014-07-24 13:02 I was comparing the documentation of IUP and FP Graphics.  I was indicating that documentation that only tells you specifically what each individual class or function does is incomplete.  It is useful to know how they inter-operate.  Obviously if I am asking basic questions I am not launching a critique.  I am only looking for a more conversational style walk through of Lazarus/FP graphics.  Nothing more - nothing less. If this is a hang-out for an in-group then ...... ---------------------------------------------------------------------- User137 · 2014-07-24 13:11 If you need functionality to scale image, neither FP or Lazarus has that with smooth interpolation. You should look for 3rd party libraries that have studied the subject much longer time, 1 of them being BGRABitmap. But if quick and dirty is enough, you can just look into TCanvas. There are tutorials for that even for Delphi, and those apply to Lazarus too. Basically CopyRect() does both scale and crop. ---------------------------------------------------------------------- BigChimp · 2014-07-24 13:13 Quote from: sean_vn on July 24, 2014, 03:02:10 pmIf this is a hang-out for an in-group then ......    This is a forum where people willingly help other people. Never ascribe to malice if incomprehension suffices ---------------------------------------------------------------------- sean_vn · 2014-07-24 13:19 Ok, I only need to do a simple data grab from jpg files.  I'll see how it goes in relation to whatever thing. ---------------------------------------------------------------------- marcov · 2014-07-24 14:14 I mostly learned how to work fcl-image using the demoes (imgconv, interpol etc). But I also only use it as last resort because it is very, very slow. The Lazarus imaging (tlazintf) is a bit faster, but since I mostly use 8-bit imgs I use my own libs.