Delphi couche alpha images PNG

Résolu
josephlatcha Messages postés 6 Date d'inscription dimanche 27 avril 2008 Statut Membre Dernière intervention 11 avril 2009 - 5 avril 2009 à 19:12
josephlatcha Messages postés 6 Date d'inscription dimanche 27 avril 2008 Statut Membre Dernière intervention 11 avril 2009 - 6 avril 2009 à 13:12
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ProgId" content="Word.Document" />
<meta name="Generator" content="Microsoft Word 11" />
<meta name="Originator" content="Microsoft Word 11" />
<link rel="File-List" href="file:///C:%5CUsers%5Cyoussef%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:right;
mso-pagination:widow-orphan;
direction:rtl;
unicode-bidi:embed;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:FR;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tableau Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->

Salut à tous








Je suis débutant en Delphi et
j'aimerais savoir s'il existe une méthode pour accéder à l'octet de la couche
alpha qui est responsable à la transparence des pixels pour une image de format
PNG, est ce qu'il y a une fonction qui ressemble au"GetRValue()image.canvas.pixels[x,y]"  et qui peut donner la valeur de transparence ou une fonction qui fait la saisie de cette valeur ?





Aider moi svp, merci d'avance.  

7 réponses

f0xi Messages postés 4205 Date d'inscription samedi 16 octobre 2004 Statut Modérateur Dernière intervention 12 mars 2022 35
6 avril 2009 à 13:03
var
  MyPNGPicture :TPNGObject;
begin
  MyPNGPicture := TPNGObject.Create;
  try
    MyPNGPicture.LoadFromFile('C:\...');
    MyPNGPicture.Alpha[N] ...
  finaly
    MyPNGPicture.Free;
  end;
end;

<hr size="2" width="100%" />
3
f0xi Messages postés 4205 Date d'inscription samedi 16 octobre 2004 Statut Modérateur Dernière intervention 12 mars 2022 35
5 avril 2009 à 19:45
PNGLib > TPNGObject

<hr size="2" width="100%" />
0
Bacterius Messages postés 3792 Date d'inscription samedi 22 décembre 2007 Statut Membre Dernière intervention 3 juin 2016 10
5 avril 2009 à 20:24
[HS]
Je peux savoir pourquoi tu écris à droite ?
/HS

Oui ben voilà f0xi a tout dit :) si tu veux implémenter la gestion des PNG dans ton application, utilise PNGLib ;)

Cordialement, Bacterius !
0
josephlatcha Messages postés 6 Date d'inscription dimanche 27 avril 2008 Statut Membre Dernière intervention 11 avril 2009
5 avril 2009 à 20:45
merci pour votre aides f0xi et Bacterius , je vais essayer avec PNGLib
a + 
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
cs_cantador Messages postés 4720 Date d'inscription dimanche 26 février 2006 Statut Modérateur Dernière intervention 31 juillet 2021 13
5 avril 2009 à 22:02
il y a également des composants PNG..

cantador
0
josephlatcha Messages postés 6 Date d'inscription dimanche 27 avril 2008 Statut Membre Dernière intervention 11 avril 2009
6 avril 2009 à 01:04
 
Le pixel
d'une image PNG est composé de 4 octets (32bits) :
3 octets pour
l'image opaque, 1 octet pour le masque alpha (transparence progressive)
même après l'utilisation de "pnglib" ,j'ai pas encore trouvé la fonction qui peut me donner directement la valeur qu'il contienne ce dernier octet , est ce qu'il y a quelqu'un qui sait cette fonction svp et qui peut me l'écrire !!!
0
josephlatcha Messages postés 6 Date d'inscription dimanche 27 avril 2008 Statut Membre Dernière intervention 11 avril 2009
6 avril 2009 à 13:12
merci énormément
normalement ça va fonctionner, je vais essayer pour valider votre repense.
0
Rejoignez-nous