"Fausse" transparence dans les png

Une question, un bug ?
Répondre
Pidou
Membre
Messages : 478
Inscription : dim. juil. 27, 2008 6:06 pm
Contact :

"Fausse" transparence dans les png

Message par Pidou »

Salut à tous,
Salut Antoine,

Je crois que je viens de comprendre pourquoi avec la transparence les couleurs sont pâlottes en png.
C'est à cause de l'antialiasing qui rajoute de transparence aux courbes.

J'ai zoomé avec Paint Shop Pro (PSP) sur un graph et voilà le résultat ci-dessous (avec le fichier xml associé)
L'avantage c'est que PSP montre la transparence avec un damier gris et blanc. On voit très bien ce damier apparaitre sous les courbes et le "grid" alors qu'ils ne sont pas censès être transparents (aucune transparence utilisé dans le code)
Si je supprime l'antialiasing, plus aucune trace de transparence autour des courbes, mais c'est très moche :roll:
J'ai vérifié cela ne se produit que sur les courbes et pas du tout lorsque qu'on fait une surface avec filled="1"...
Le "grid" quant à lui à toujours une petite transparence... Mais je n'ai pas trouvé comment régler sa couleur...

Voilà de quoi donner de bonnes heures de méditations :lol: 8)

Code : Tout sélectionner

<?xml version="1.0" encoding="iso-8859-1" ?>
<stylesheet>
	<image width="500" height="175" />
	<frame width="500" height="20" position-x="0" position-y="0" shadow="0">
		<background color1="FFDDDDFF" color2="FFFFFFFF" gradient="1" gradient-direction="135" stretch="1" />
		<border cornerradius="0" color="FF9999FF" thick="1" />
	</frame>
	<!-- ================= Lineplot 2 ================= -->
	<lineplot width="500" height="155" shadow="0" position-x="0" position-y="20" margin-top="15" margin-right="75" margin-bottom="25" margin-left="75" >
		<background color1="FFCCFFCC" color2="FFFFFFFF" gradient="1" gradient-direction="135" stretch="1" />
		<border cornerradius="0" color="FF99FF99" thick="1" />
		<graphbackground color="FFFFFFFF" />
		<xaxis color="FF000000" grid="1" autoscale="0" min="0" max="0" titleside="bottom" >
			<title text="" alignement="vcenter|hcenter" angle="0">
				<font color="FF000000" facename="Arial" size="12" weight="400" italic="0" />
			</title>
			<labels labelinterval="1" angle="0" format="%Hh%M" side="left" hide="0">
				<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
			</labels>
			<ticks majorticks="7" minorticks="3" side="bottom" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
		</xaxis>
		<y1axis side="left" color="FF9999FF" grid="1" autoscale="1" min="0" max="300" titleside="top" titlemargin="25">
			<title text="Précipitations ($Unit[Rainfall])" alignement="vcenter|hcenter" angle="0">
				<font color="FF9999FF" facename="Arial" size="12" weight="400" italic="1" />
			</title>
			<labels labelinterval="1" angle="0" format=".1" side="left" hide="0">
				<font color="FF9999FF" facename="Arial" size="12" weight="400" italic="1" />
			</labels>
			<ticks majorticks="5" minorticks="4" side="left" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
		</y1axis>
		<y2axis color="FFFF6666" grid="1" autoscale="1" min="0" max="0" titleside="top" titlemargin="20" ydelta="40">
			<title text="Vitesse du vent ($Unit[Speed])" alignement="vcenter|hcenter" angle="0">
				<font color="FFFF6666" facename="Arial" size="12" weight="400" italic="1" />
			</title>
			<labels labelinterval="1" angle="0" format=".0" side="left" hide="0">
				<font color="FFFF6666" facename="Arial" size="12" weight="400" italic="1" />
			</labels>
			<ticks majorticks="5" minorticks="4" side="left" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
		</y2axis>
		<y3axis side="right" color="FFFFAA00" grid="1" autoscale="1" min="0" max="300" titleside="right" titlemargin="25" ydelta="0">
			<title text="Energie Solaire (W/m²)" alignement="vcenter|hcenter" angle="0">
				<font color="FFFFAA00" facename="Arial" size="12" weight="400" italic="1" />
			</title>
			<labels labelinterval="1" angle="0" format=".0" side="right" hide="0">
				<font color="FFFFAA00" facename="Arial" size="12" weight="400" italic="1" />
			</labels>
			<ticks majorticks="5" minorticks="4" side="right" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
		</y3axis>
		<y4axis side="right" color="FF009000" grid="1" autoscale="1" min="0" max="300" titleside="right" titlemargin="20" ydelta="40">
			<title text="Précipitation 24h (mm)" alignement="vcenter|hcenter" angle="0">
				<font color="FF009000" facename="Arial" size="12" weight="400" italic="1" />
			</title>
			<labels labelinterval="1" angle="0" format=".0" side="right" hide="0">
				<font color="FF009000" facename="Arial" size="12" weight="400" italic="1" />
			</labels>
			<ticks majorticks="5" minorticks="4" side="right" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
		</y4axis>
		<legend orientation="0" margin="0" width="500" position-x="3" position-y="0" hide="0" shadow="0">
			<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
		</legend>
	<data>
		<wind_speed axisbind="y2axis" legend="Vitesse du vent" color1="FFFFAAAA" color2="FFFFCCCC" antialiasing="1" filled="1" />
		<wind_gust axisbind="y2axis" legend="Rafales" color1="FFFF3333" color2="FFFF3333" antialiasing="1" filled="0" hidelegend="0" thick="1.2"/>
		<relative_rainfall axisbind="y1axis" legend="Précipitations" color1="FF9999FF" color2="FFCCCCFF" antialiasing="1" filled="1" />
		<relative_rainfall axisbind="y1axis" legend="Précipitations" color1="FF7777FF" color2="FF7777FF" antialiasing="1" filled="0" hidelegend="1" thick="1" />
		<rainfall_24h axisbind="y4axis" legend="Précipitations 24h" color1="FF009000" color2="FF009000" antialiasing="1" filled="0" hidelegend="0" thick="1.2" />
		<solar_radiation axisbind="y3axis" legend="Energie Solaire" color1="FFFF9900" color2="FFFF9900" antialiasing="1" filled="0" thick="2"/>
	</data>
	</lineplot> 
</stylesheet>
Vous ne pouvez pas consulter les pièces jointes insérées à ce message.
Ma station => http://www.meteo-boisney.fr
Image
--- Station Vantage Pro 2 - Plugin VantagePro.dll ---
--- GraphWeather Version 2.0.312b ---
Avatar de l’utilisateur
TiToine
Site Admin
Messages : 3356
Inscription : lun. mars 20, 2006 11:16 am
Localisation : Montréal
Contact :

Re: "Fausse" transparence dans les png

Message par TiToine »

J'ai déjà remarqué des choses bizarres...ca va dans ton sens. J'ai bien essayé de modifier les options de rendu dans DirectX mais rien n'y fait.
Pidou
Membre
Messages : 478
Inscription : dim. juil. 27, 2008 6:06 pm
Contact :

Re: "Fausse" transparence dans les png

Message par Pidou »

Ce n'est pas si grave et surement très dur à modifier...
Ca donne un petit air fantomatique à certains de mes graphs affichés dans les rapports NOAA, car on devine une partie du texte derrière.

Si tu jettes un oeil sur mon site, regarde page "NOAA", ceux à partir du 15/02/09, surtout celui du vent. Il faut que je régénère les autres, mais là c'est une erreur de ma part :lol:
Ma station => http://www.meteo-boisney.fr
Image
--- Station Vantage Pro 2 - Plugin VantagePro.dll ---
--- GraphWeather Version 2.0.312b ---
Répondre