Closed vico93 closed 5 years ago
Hi @lordvico - I suggest you look at the composite
command. sharp composite --help
should give you insight on how to achieve what you want.
I tried to issue sharp composite <windows_folder_icon_dir>\256.png --image emoji_256.png --gravity southeast --offset +16+29 -o ".\<emoji_name>"
but i got problems with the offset
parameter. I didnt find how i could write it on documentation.
The offset takes an array - try sharp composite <windows_folder_icon_dir>\256.png --image emoji_256.png --gravity southeast --offset 16 29 -o ".\<emoji_name>"
.
Other thing: in magick i could specify the output image directly (eg. compositeicon_256.png
), while in sharp i always need to specify a directory, without chance of change the output filename.
Is it right or there's another way?
You should be able to use a filename as output - but there are some issues with this (see #16).
Well, i'm almost giving up of what i'm trying to do - basically make windows folder icons for every twemoji glyph - for that i need to raster every svg in several pngs for every size of the icon (using svg2png
), then i put the glyph in front of the folder png (thats is what i'm trying to make with the line above) and then i make the .ico with icon-gen
.
BTW I have my efforts here, currently i'm making it on batch. If i could make everything only on sharp... but i completely lost right now.
Closing this - see #16 for follow-up.
Hi!
First of all sorry for bothering you with this question.
I'm in a process to switch from imagemagick to sharp-cli but i'm having headaches trying to "convert" this composite command (who basically "stamps" a emoji .png file into a Windows Folder icon .png and outputs the composite result in another .png file for further processing):
magick <windows_folder_icon_dir>\256.png emoji_256.png -gravity SouthEast -geometry +16+29 -composite "compositeicon_256.png"
Is possible to make the same result using sharp-cli alone? Thanks in advance!