Skip to content

Commit

Permalink
Also convert "svg" files to "png" files for hardcopy.
Browse files Browse the repository at this point in the history
The existing `convert_file_to_png_for_tex` already works for that.
  • Loading branch information
drgrice1 committed Apr 24, 2024
1 parent f6597af commit d592110
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/PGalias.pm
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ sub alias_for_tex {
$resource_object->path($file_path);
}

if ($ext eq 'gif' ? 1 : 0) {
# Convert gif files to png files.
if ($ext eq 'gif' || $ext eq 'svg') {
# Convert gif and svg files to png files.
$self->convert_file_to_png_for_tex($resource_object, $ext eq 'html' ? 'html' : 'images');
} else {
# Path and URI are the same in this case.
Expand Down Expand Up @@ -376,7 +376,7 @@ The link name is the file unique id alias.
Usage: C<< $pgAlias->convert_file_to_png_for_tex($resource_object, $target_directory) >>
Converts a "gif" file to a "png" file. The "png" file is saved in
Converts a "gif" or "svg" file to a "png" file. The "png" file is saved in
C<$target_directory> and the file name is the unique id alias for the
C<PGresource> referenced by C<$resource_object>.
Expand Down

0 comments on commit d592110

Please sign in to comment.