Faq.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="../Xsl/doc2html.xsl"?>
  3. <doc>
  4. <title>FAQ</title>
  5. <chapter>
  6. <title>FAQ</title>
  7. <par>Here are answers to some user questions that showed up in the forums/mails and
  8. some made up (but maybe useful) questions too :</par>
  9. <olist>
  10. <li>
  11. <b>I'm using Delphi XYZ or Lazarus ABC and I want to install Imaging package
  12. into IDE. Where do I find the right package?</b>
  13. <par>Package projects are located in <keyword>(Imaging Root)\Source\Projects</keyword>
  14. directory:
  15. <blist>
  16. <li><keyword>VampyreImagingPackage.D2009.dproj</keyword> package for Delphi 2009 and 2010.</li>
  17. <li><keyword>VampyreImagingPackage.D2007.dproj</keyword> package for Delphi 2007 (Codegear RAD Studio).</li>
  18. <li><keyword>VampyreImagingPackage.D2006.bdsproj</keyword> package for Delphi 2006 (Borland Developer Studio),
  19. should work for Turbo Delphi too.</li>
  20. <li><keyword>VampyreImagingPackageD7.dpkw</keyword> package for Delphi 7, should work for Delphi 6 too.</li>
  21. <li><keyword>vampyreimagingpackage.lpk</keyword> package for latest Lazarus.</li>
  22. </blist>
  23. </par>
  24. </li>
  25. <li>
  26. <b>Imaging doesn't compile in Lazarus, there are errors in ImagingComponents.pas unit! </b>
  27. <par>Lazarus is still beta and breaking changes in LCL occur from time to time.
  28. Imaging release always compiles with latest official Lazarus release.
  29. Fixes are sometimes already in SVN repository but they are commented out
  30. until new Lazarus version is released.
  31. If you get errors in this unit it can be one of these cases:
  32. <olist>
  33. <li>You are using latest official Lazarus release that was released
  34. after latest Imaging release: Check Imaging's SVN repository,
  35. LCL version conflicts will probably already be fixed (or fixes would be there
  36. but commented out - so just uncomment them).
  37. </li>
  38. <li>You are using some working Lazarus SVN revision: Check Imaging's SVN repository,
  39. fixes could already be there but commented out. If they're not
  40. please let me know and I'll add them.
  41. </li>
  42. </olist>
  43. So basically if you get the latest Imaging from SVN and problem is still there
  44. with no commented fix please let me know, better yet send the diff patch of
  45. the unit (my thanks to those who did).
  46. </par>
  47. </li>
  48. <li>
  49. <b>Imaging won't compile in Linux, error while linking: "cannot find library stdc++"</b>
  50. <par>This library was needed for JPEG 2000 support but as of Imaging 0.26.2
  51. it is no longer the case (replaced by libc and few Pascal functions).</par>
  52. </li>
  53. <li>
  54. <b>My compiled programs are very very large!</b>
  55. <par><i>Delphi:</i> With all file formats enabled your binary can be about ~900KiB bigger than
  56. without Imaging. If you don't like this you can disable some file formats.
  57. Best candidates are: TIFF ~400KiB!, JPEG 2000 ~150KiB, JPEG ~100KiB,
  58. PNG ~50KiB. Info about how to enable/disable file formats
  59. is in <link url="../Extensions/ExtFileFormats.xml">File Format Extensions</link>.
  60. <br/>
  61. <i>FPC:</i> There's no large TIFF support and FPC generated exes are
  62. bigger than Delphi's anyway so binary size may not bother you so much.
  63. But if it does you can disable file formats too.
  64. </par>
  65. </li>
  66. <li>
  67. <b>How can I display images to user using Imaging? And it should be fast too...</b>
  68. <par>Displaying images wasn't one of Imaging's design goals:
  69. "You can use it to load images, prepare them, and then display them
  70. using some other library designed and optimized for this purpose."
  71. You can quickly and easily create Direct3D, OpenGL, and SDL textures/surfaces
  72. using Imaging and then display them using these APIs.
  73. VCL/LCL TGraphic descendant classes were later added
  74. to allow easy display of your images on you forms.
  75. But it basically just converts image to TBitmap and all drawing
  76. is handled by GDI (GTK/Qt/whatever) just like your regular TBitmap.
  77. Only 32bit images can be directly displayed on TCanvas (GDI/GTK only)
  78. using simple underlying OS/toolkit call in
  79. <ref>DisplayImage</ref> function (but with no fancy stuff like alpha blending etc.).
  80. </par>
  81. <par>
  82. So Imaging is best used if you prepare your in-memory image with it (load, resample,
  83. change format, gamma correction, alpha blend, etc.) and then show it to
  84. the user using libraries like OpenGL, Direct3D, SDL, Graphics32
  85. or convert it to TBitmap and use it in regular VCL/LCL way.
  86. </par>
  87. </li>
  88. <li>
  89. <b>Where is collision detection? Window management? Audio support?</b>
  90. <par>Imaging is image library not gaming or any other. It can load, save,
  91. and alter raster images.
  92. </par>
  93. </li>
  94. </olist>
  95. </chapter>
  96. </doc>