Code:
<?php
require 'class.Level.php';
require 'class.Tileset.php';
$oLevel = new Level('battle1.j2l');
header('Content-type: image/png');
echo $oLevel->getRealPreview();
To see it in action check the J2O downloads and click a file name in the "file contents" part
I've made a few tweaks to it since I published the code there, I'll probably put an updated version online soon.
|