Trying to save

This commit is contained in:
Kasper Rynning-Tønnesen
2015-11-28 20:19:30 +01:00
parent f32ece8156
commit a44111a6e0
4 changed files with 15 additions and 2 deletions

View File

@@ -10,5 +10,9 @@ $image->blurImage(30,50);
$output = $image->getimageblob(); $output = $image->getimageblob();
$image->setImageFormat("jpeg");
file_put_contents ("/images/thumbnails/".$_POST['id'].".jpg", $image);
echo base64_encode($output); echo base64_encode($output);
?> ?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -121,6 +121,15 @@ var Nochan = {
if(Nochan.blob_list[i] !== undefined){ if(Nochan.blob_list[i] !== undefined){
//$(".room-namer").css("opacity", 0); //$(".room-namer").css("opacity", 0);
var img = new Image();
img.src = "/images/thumbnails/"+id;
img.onerror = function(){ // Failed to load
console.log("didn't find");
};
img.onload = function(){ // Loaded successfully
console.log("found");
};
setTimeout(function(){ setTimeout(function(){
$("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")"); $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")");
$("#mega-background").css("background-size" , "200%"); $("#mega-background").css("background-size" , "200%");