PNGIMG conflitcs with GraphicEX?

  • Hello Julian,

    I'm currently using WpTools 6.25.4 with the GraphicEx library on Delphi XE2.

    I've noticed though that PNG images are no longer loaded correctly. I can add an image, save it to a RTF file. But when i load that RTF file the image is no longer visible.

    When disabling the PNGIMG compiler define in WPOBJ_Image i nog longer have problems.

    This is where i get confused though:

    WPINC.inc reads:

    Zitat

    // Activate this define to use TPNGImage to load PNG and GIF files.
    // If you use also GraphicEx you
    // should deativate the PNG support in GraphicConfiguration.inc
    // --> see unit WPObj_Image
    // (Delphi 2009+ containes PNGImage)
    {.$DEFINE PNGIMG}

    WPOBJ.Image.pas read:

    It looks like GIFIMG is not included in my setup. So the GraphicEx remains defined.
    I've then tried deactivating PNG support in GraphicConfiguration.inc as suggested, but with GraphicEx defined WpTools will then no longer compile ("undeclared identifier TPNGImage").

    I'm not really sure how it is supposed to work

    Should i disable PNGImg?
    Should i disable GraphicEx?
    Should i enable GifImg?

    Since GraphicEx supports a lot of different formats disabling it entirely for just native PNG and GIF supports doesn't seem like a very good trade.

  • I implemented an email client that displays emails in HTML format. I had the problem that all images were displayed except GIFs. I had to experiment a bit to find a solution.

    This is how I do it now (for Delphi XE2):

    In WPObjImage.pas I changed two things:

    Original:
    {-$DEFINE GIFIMG}

    My version:
    {$DEFINE GIFIMG}

    Original:
    {$IFDEF GIFIMG}, {$IFDEF DEL2007ANDUP}gifimg{$ELSE}gifimage{$ENDIF}{$ENDIF}

    My version:
    {$IFDEF GIFIMG}, {$IFDEF DEL2007ANDUP}Vcl.Imaging.GIFImg{$ELSE}gifimage{$ENDIF}{$ENDIF}