Re: [Lazarus] about TDFB
Dear Mr. Geldenhuys: thanks very much. Now I have already prepared a Report (LazReport) and I have added a tipo field coding de Sex+HairColor+SkinColor+YearBorn+MonthBorn thinking in an auxiliary index for ordering. I have to learn a lot about how to do queries. In Access it is easy. Thanks again, Ing. Héctor F. Fiandor Rosario hfian...@infomed.sld.cu - Original Message - From: Graeme Geldenhuys graemeg.li...@gmail.com To: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Sent: Thursday, December 08, 2011 1:28 AM Subject: Re: [Lazarus] about TDFB On 7 December 2011 23:22, Ing. Héctor F. Fiandor Rosario hfiandor@i. wrote: I am using the jpg images and obtain the same results. In that case the jpg file is already in a compressed form, so using base64 + gzip will not gain much. Using a standard BLOB field (like you already do) is fine in this case. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] about TDFB
2011/12/7 Graeme Geldenhuys graemeg.li...@gmail.com: 2011/12/7 Ing. Héctor F. Fiandor Rosario hfiandor@: thanks very much, My pleasure. If you are storing *.bmp files, they are uncompressed images (always I think), so can be rather large. If storage size might be a problem, I would then suggest you base64 encode the image, then gzip the base64 tex, then store in a field. This reduces the storage size considerably. This is what I use in some of my projects. I wonder: why base64 encode the image in the first place? I thought it was to make plain ascii, suitable for a text field. Then I don't understand how you can keep it plain ascii (no null characters, for example), if you gzip it. Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] about TDFB
8 December 2011 14:19, Vincent Snijders wrote: I wonder: why base64 encode the image in the first place? I thought it was to make plain ascii, suitable for a text field. Then I don't understand how you can keep it plain ascii (no null characters, for example), if you gzip it. Well spotted Vincent. The order must be the other way round. gzip first, then base64 encode it, before storing in a text field in DB. The same process gets done when we transmit binary data via XML over HTTP in our multi-tier setup. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus Package Library (lpk) - Linking question
Hi, For example BGRAControls package. If I drop TBGRAButton on form, Lazarus automatically add BGRAControls package as required in project inspector. Then, If I build project, it seems that compiler adds all controls from this package to exe even if I don't use them, because if I delete BGRAControls package from required section and add path to BGRAButton unit manually, then exe is much smaller. How does it work? Exists any compilator optimization switch for strip unused units from project packages? Regards, Dibo -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus Package Library (lpk) - Linking question
On 8 December 2011 20:46, Krzysztof dib...@wp.pl wrote: Exists any compilator optimization switch for strip unused units from project packages? Enable smartlinking. I believe the smartlinking is not 100% as good as Delphi. I also know that LCL pulls in a lot more than needed. I don't know if the latter is due to packages or something else. What I do know (and what is a real pain with Lazarus Packages), is that if you want to apply new compiler options or optimization to you project, you have to apply those same settings to each and every lazarus package that your project used. This is why I lately prefer to rather set the Unit Search Path, and macros - thus avoiding the use of Lazarus Packages completely - and in return reducing the problems you and I just mentioned. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus Package Library (lpk) - Linking question
On 08.12.2011 19:46, Krzysztof wrote: Hi, For example BGRAControls package. If I drop TBGRAButton on form, Lazarus automatically add BGRAControls package as required in project inspector. Then, If I build project, it seems that compiler adds all controls from this package to exe even if I don't use them, because if I delete BGRAControls package from required section and add path to BGRAButton unit manually, then exe is much smaller. How does it work? Exists any compilator optimization switch for strip unused units from project packages? You might try to disable the option Add package unit to uses-clause in the options of the package and see if that helps (I don't know whether it does indeed help, but it's one of the first things I do if I create a package or use one). Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus Package Library (lpk) - Linking question
On Thu, 08 Dec 2011 21:31:46 +0100 Sven Barth pascaldra...@googlemail.com wrote: On 08.12.2011 19:46, Krzysztof wrote: Hi, For example BGRAControls package. If I drop TBGRAButton on form, Lazarus automatically add BGRAControls package as required in project inspector. Then, If I build project, it seems that compiler adds all controls from this package to exe even if I don't use them, because if I delete BGRAControls package from required section and add path to BGRAButton unit manually, then exe is much smaller. How does it work? Exists any compilator optimization switch for strip unused units from project packages? Remove the unit BGRAControls from the uses section. Or use refactoring / unused units You might try to disable the option Add package unit to uses-clause in the options of the package and see if that helps (I don't know whether it does indeed help, but it's one of the first things I do if I create a package or use one). It's the default for new packages since some months. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus