[DevExpress Support Team: CLONED FROM S34199: RAD Studio 2009 and later - Make TdxPNGImage class registration optional for loading PNG images]
I, too, am having an issue. Our images are becoming TdxPNGImage types instead of TPNGImage types.
The problem we are having is that the forms were made years ago and all the images are TPNGImage types, but the newer TdxPNGImage will never appear on our forms.
I've tried the method for removing the DXREGISTERPNGIMAGE defined in cxVer.inc, but that has not corrected the issue. Images still show up as TdxPNGImage types.
I've looked into dxGDIPlusClasses.pas and I noticed that there is an IFNDEF statement that still registers the PNG files as a smart image! So damned if you do, damned if you don't.
Still need a workaround. Tried a few things but to no avail and I'm at my wits end on how to get my PNG images to appear in the object inspector as TPngImage types instead of TdxPngImage types.
Even though I have DevExpress 17.1.8 installed and followed the procedure to allow for standard PNG files, it just doesn't respect it. This is a new machine, so there are no other VCL DevExpress components that were previously installed. However, I also have DevExpress installed for .NET, but I would think the two would not in any way intermingle (I can see the code bases exist in two separate folders). So, why is this not working as indicated when removing the DEFINE from cxVer.inc for me in the Embarcadero platform (Berlin 10.1 Update 2)?
Thanks in advance for any help you can provide.
Hello,
Would you please clarify whether you tried all steps of the following instruction?
//{$DEFINE DXREGISTERPNGIMAGE}
It continues to register the PNG images as smart PNG images. Cutting and pasting a previous response was not the support I expected, but *shrug*.
1. Correct VCL.
2-3. Modified the cxVer.inc to comment out the DXREGISTERPNGIMAGE define.
4. Recompiled the devexpress controls.
5-7. Images are still TdxPngImage pictures.
The exact same thing I had done before this reply and indicated as such in my initial request. I've looked into the dxGDIPlusClasses.pas and I see that you register these images either 1) based on whether DevExpress is installed (DXREGISTERPNGIMAGE is defined) or 2) register it anyways (when DXREGISTERPNGIMAGE is not defined).
Am I not understanding this (code snippets from dxGDIPlusClasses.pas)?
1) The define exists and it registers DevExpress images as smart images (excluding BMPs).
{$IFDEF DXREGISTERPNGIMAGE}
TPicture.RegisterFileFormat(AExtension, ADescription, AImageClass);
{$ENDIF}
2) Registers the images as smart images anyways because the define is not present.
{$IFNDEF DXREGISTERPNGIMAGE}
TPicture.RegisterFileFormat('', '', TdxGPImage);
TPicture.RegisterFileFormat('', '', TdxSmartImage);
TPicture.RegisterFileFormat('', '', TdxPNGImage);
{$ENDIF}
Thank you for the clarification.
I need to note that old images will use those graphic class that loaded them. However, for new images our class will not be used.
Is there still no fix for this as I want to use smart images in a DevEx project but not in a TMS Web project that dos not use any DevEx controls.
Hello Ken,
We haven't changed this behavior. However, we've discussed it with our developers again and will consider the possibility to resolve this issue in the future.