1

Im using few libraries that unregister previous TPicture loading in TImages in design-time. It looks like it is using TPicture.RegisterFileFormat and TPicture.UnregisterGraphicClass.

This is not a problem in general, but now I want to load some images for my app in design-time using TPNGImage from acPNG from AlphaControls as it works much better for rendering PNGs than Vampyre Imaginig, which is great and I need it - but it can't properly render PNG on form.

My question is: how to select one of working handlers of TImage.Picture in design-time editor. So I've been using AlphaSkins or some other libraries and they work, but they get overwritten in time when installing another libraries. So this is general question, not connected with any 3rd party library.

What I've already tried:

  • Putting acPNG in uses and removing ImgagingComponents (this is the only one with registers/unregisters, but even if I remove all of Imaging* units it doesn't work);
  • Trying to set globally, in unit etc directive DONT_LINK_PNG, undefinig COMPONENT_SET_VCL - it doesnt work for me, probably it would work if I just reinstall all of the Imaging components with those flags (or am I missing something?);
  • Selecting from list Portable Network Graphics (.png) (AlphaSkins)*, but it seems this is ignored when loading.

Thanks in advance, greetings, JK.

Jakub Krol
  • 350
  • 5
  • 16
  • 1
    Unclear what you are asking. Are you asking how to use 3rd party libraries such as AlphaSkin? If so, I would ask the vendor. –  Feb 27 '14 at 05:52
  • OK, I'm asking how to select one of working handlers of TImage.Picture in design-time editor. So I've been using AlphaSkins or some other libraries and they work, but they get overwritten in time when installing another libraries. So this is general question, not connected with any 3rd party library. – Jakub Krol Feb 27 '14 at 14:32
  • Ok, I have managed how to disable Vampyre Imaging from beeing default for new projects. In ImagingOptions.inc we need to uncomment all `{$DEFINE DONT_LINK_}` we need. This does work for any new project, however, when I added ImagingComponents to uses and remove it, I cannot get previous state - ie. bitmaps will still be stored as TImagingBitmap, bot TBitmap... Any ideas? I dont know what can i clear? I did Clean, Recompile, Rebuild etc - no results. – Jakub Krol Aug 30 '14 at 09:51
  • OK, to disable it in the project I already have I have created simple component - adding old classes (example if you need here: http://pastebin.com/pYAr58n8 ). After I add component to project, I have my required handlers for TPicture, then I can delete uses reference and component itself. So it does work. I dont mark it as answer because I have one more question: where does Delphi (2009 Pro) cache this information and how to "refresh" this cache? – Jakub Krol Aug 30 '14 at 10:17
  • @edit: My component is required all the time, as it looks like Vampyre is re-registering itself after each IDE restart. – Jakub Krol Aug 30 '14 at 10:21

0 Answers0