Euh, je suis désolé de n'avoir pas tout saisi,
pour l'instant j'essaye d'adapter la source de Jeanphi :
Mais je n'arrive pas à remplacer le jpg généré par mon clip :
voir le fla + php ici :
[ Lien ]Le voir en live ici :
[ Lien ]PS : la taille de l'image exportée n'est pas bonne non plus (mon site fait 1080 x 768)
PHP :
<?php
$lv = $_POST['tab'];
$temp = explode(",",$lv);
settype($temp[1],'integer');
$sortie = imagecreatetruecolor(1080,768);
$k = 0;
for($i=0; $i<1080; $i++){
for($j=0; $j<768; $j++){
imagesetpixel($sortie,$j,$i,$temp[$k]);
$k++;
}
}
$lien = 'http://catalarem.com';
$couleur_texte = imagecolorallocate($sortie, 255, 255, 255);
imagestring($sortie, 1, 900, 730, $lien, $couleur_texte);
@ob_end_clean();
@ini_set('zlib.output_compression','Off');
header('Pragma: public');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: must-revalidate, pre-check=0, post-check=0, max-age=0');
header('Content-Tranfer-Encoding: none');
header('Content-Type: application/octetstream; name="capture.jpg"');
header('Content-Disposition: attachement; filename="capture.jpg"');
imagejpeg($sortie,"",100);
imagedestroy($sortie);
exit();
?>
AS :
import flash.display.BitmapData;
import flash.geom.*;
bitmap = new BitmapData(1080, 748, true);
this.attachBitmap(bitmap, 10);
_onEnterFrame = function () {
bitmap.perlinNoise(Math.random()*1000, Math.random()*600, Math.random()*5, Math.random()*10, 1, 1, Math.random()*8, 0);
};
inter = setInterval(this, "_onEnterFrame", 1080);
////
btn2.onRelease = function() {
lv = new LoadVars();
lv.tab = new Array();
for (i=0; i<1080; i++) {
for (j=0; j<768; j++) {
lv.tab.push(bitmap.getPixel(j, i));
}
}
lv.send("http://catalarem.com/travaux/arbre/rem/generejpg.php", "_self", "POST");
};