Removing svgexport.
This commit is contained in:
parent
c311f33494
commit
b85308eca8
@ -134,15 +134,14 @@ sub PostPreviewOg {
|
|||||||
|
|
||||||
my $svg =
|
my $svg =
|
||||||
$self->_GenerateSVGPostPreview( $title, \@new_content, $post->{image} );
|
$self->_GenerateSVGPostPreview( $title, \@new_content, $post->{image} );
|
||||||
my $svgexport = path($ENV{HOME})->child('node_modules/.bin/svgexport');
|
my ( $stdout, $stderr ) = capture {
|
||||||
die "No svgexport." if !-f $svgexport;
|
open my $fh, '|-', qw{convert /dev/stdin png:fd:1};
|
||||||
my $tmpdir = Path::Tiny->tempdir();
|
binmode $fh, 'utf8';
|
||||||
my $input = $tmpdir->child('input.svg');
|
print $fh $svg;
|
||||||
my $output = $tmpdir->child('output.png');
|
close $fh;
|
||||||
|
};
|
||||||
$input->spew_utf8($svg);
|
say STDERR $stderr;
|
||||||
system $svgexport, $input, $output, 'png';
|
return $stdout;
|
||||||
return $output->slurp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _AttachImageSVG {
|
sub _AttachImageSVG {
|
||||||
|
Loading…
Reference in New Issue
Block a user