Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
41e48196
Commit
41e48196
authored
Jul 28, 2017
by
dylan araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image: Add support for transparency when using pdf or svg as input
parent
6cc08b54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
CHANGELOG.md
CHANGELOG.md
+2
-0
neofetch
neofetch
+11
-1
No files found.
CHANGELOG.md
View file @
41e48196
...
...
@@ -24,6 +24,8 @@
## Images
-
[
w3m
]
Fixed w3m-img not found on NixOS.
-
Added support for using all image types as input.
-
Neofetch now supports
`svg`
,
`tiff`
etc.
## ASCII
...
...
neofetch
View file @
41e48196
...
...
@@ -2497,7 +2497,14 @@ get_image_size() {
make_thumbnail
()
{
# Name the thumbnail using variables so we can
# use it later.
image_name
=
"
$crop_mode
-
$crop_offset
-
$width
-
$height
-
${
image
//\//_
}
.jpg"
image_name
=
"
$crop_mode
-
$crop_offset
-
$width
-
$height
-
${
image
//
'/'
/_
}
"
# Handle file extensions.
case
"
${
image
##*.
}
"
in
"eps"
|
"pdf"
|
"svg"
|
"gif"
|
"png"
)
image_name+
=
".png"
;;
*
)
image_name+
=
".jpg"
;;
esac
# Create the thumbnail dir if it doesn't exist.
mkdir
-p
"
$thumbnail_dir
"
...
...
@@ -2523,6 +2530,7 @@ make_thumbnail() {
-format
"%[pixel:p{0,0}]"
info:
)
"
convert
\
-background
none
\
"
$image
"
\
-trim
+repage
\
-gravity
south
\
...
...
@@ -2534,6 +2542,7 @@ make_thumbnail() {
"fill"
)
convert
\
-background
none
\
"
$image
"
\
-trim
+repage
\
-scale
"
$width
"
x
"
$height
"
^
\
...
...
@@ -2544,6 +2553,7 @@ make_thumbnail() {
"none"
)
cp
"
$image
"
"
$thumbnail_dir
/
$image_name
"
;;
*
)
convert
\
-background
none
\
"
$image
"
\
-gravity
"
$crop_offset
"
\
-crop
"
$size
"
x
"
$size
"
+0+0
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment