Skip to content

Commit

Permalink
add vips functions for testing colour-space conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
mtiessen1175 committed Oct 7, 2024
1 parent a641fcf commit 66f67e6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Jobs/TileSingleOverlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use FileCache;
use Biigle\Modules\Geo\GeoOverlay;
use File;
use Jcupitt\Vips;

class TileSingleOverlay extends TileSingleObject
{
Expand Down Expand Up @@ -55,4 +56,23 @@ public function handle()
File::deleteDirectory($this->tempPath);
}
}

/**
* Generate tiles for the object and put them to temporary storage.
*
* @param File $file
* @param string $path Path to the cached image file.
*/
public function generateTiles($file, $path)
{
$vipsImage = $this->getVipsImage($path);
$sourceSpace = Vips\FFI::vips()->vips_image_guess_interpretation($vipsImage);
// dd($sourceSpace);

$vipsImage->colourspace(Vips\Interpretation::RGB16)->dzsave($this->tempPath, [
'layout' => 'zoomify',
'container' => 'fs',
'strip' => true,
]);
}
}

0 comments on commit 66f67e6

Please sign in to comment.