mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
Improved logo display in Invoice/Estimate PDFs
This commit is contained in:
18
app/Space/ImageUtils.php
Normal file
18
app/Space/ImageUtils.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Space;
|
||||
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class ImageUtils
|
||||
{
|
||||
/**
|
||||
* Convert local path to Base64 encoded data source
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function toBase64Src($path)
|
||||
{
|
||||
return sprintf('data:%s;base64,%s', File::mimeType($path), base64_encode(File::get($path)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user