View Single Post
  #10  
Old 11-06-2017, 10:39 AM
gwynmil's Avatar
gwynmil gwynmil is offline
Member
 
Join Date: Sep 2017
Location: UK
Posts: 25
Gender: Female
Credits: 3,520
gwynmil is on a distinguished road
Default

OK, finally giving this a try (feeling slightly more confident than last week, though the breeding script edits will still be offloaded to you, haha. I'm afraid to touch that stuff yet).

edit: never mind, figured out first issue. Reading that TGL thread was very helpful.

Still getting a blank image though. Syntax error maybe? I removed the composite_dstin bit 'cause that command isn't needed here.

PHP Code:
<?php
class GriffimageController extends AppController{
    
    public function 
index(){

$mysidia Registry::get("mysidia");

$fullurl $_SERVER['HTTP_REFERER'];
$cleanaid  end(explode('/',trim($fullurl,'/')));

$pet $mysidia->db->select("owned_adoptables", array(), "aid='$cleanaid'")->fetchObject();

$images = array(
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/legs/' $pet->legs '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/outer2/' $pet->outer2 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/outer1/' $pet->outer1 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/inner2/' $pet->inner2 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/inner1/' $pet->inner1 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/hind/' $pet->hind '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/fore/' $pet->fore '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/horns/' $pet->horns '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/beak/' $pet->beak '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/eyes/' $pet->eyes '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/line.png'
);

$composed_image = new \Imagick($images);

$image $composed_image->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);
$image->setImageFormat('png');

header('Content-type: image/png');
echo 
$image->getImageBlob();
    }
}
?>
Example body part url: http://griffusion.elementfx.com/picu.../fore/blue.png
Linearts are in the level folder: http://griffusion.elementfx.com/picu...h/f/5/line.png

Sorry for the constant questions, haha. You've been amazingly helpful lately.

Last edited by gwynmil; 11-06-2017 at 01:01 PM.
Reply With Quote