Hello,
I have a problem with an image and its code of invisible color.
In the IDE, I load a picture and I indicate the color that is invisible (Lemon = 65280) and everything works.
But my problem is when I want to load my image in programming then the invisible color does not.
The image appears, but the color appears invisible anyway.

Here are my lines of code:

  RS: = TResourceStream.Create (hInstance, str, RT_RCDATA);
   image1.multiResBitmap.TransparentColor: = 65280;
   image1.MultiResBitmap.LoadItemFromStream (rs, 1);
   rs.Free;

 
Does someone has an idea?

Thanks in advance.
===============
Bonjour,
J'ai un probleme avec une image et son code de couleur invisible.
Dans l'IDE, je charge un image et j'indique la couleur qui est invisible (Citron = 65280) et tout fonctionne bien.
Mais mon probleme, c'est quand je veux charger mon image dans la programmation alors la couleur invisible ne fonctionne pas.
L'image apparait mais la couleur invisible apparait quand meme.

Voici mes lignes de code:

RS := TResourceStream.Create(hInstance, str, RT_RCDATA );
image1.multiResBitmap.TransparentColor := 65280;
image1.MultiResBitmap.LoadItemFromStream(rs,1);
rs.Free;


Est-ce quelqu'un a une idee?

Comments

  1. Bonjour, je n'ai pas testé votre code, mais de mémoire, j'affecte la couleur transparente après avoir chargé mon image.

    ReplyDelete

Post a Comment