sips

【技巧】mac命令行转化图片格式

回眸只為那壹抹淺笑 提交于 2020-04-06 22:41:13
###命令行行天下 sips可以转换一个或多个图片文件的文件格式 sips -s format [格式名称] [文件名] --out [输出文件的名称] sips -s format png goswift.jpg --out goswift.png 要想批量转换图片文件,我们需要使用下面命令格式 for i in [文件名]; do sips -s format [格式名称] $i --out [终点]/$i.[格式名称];done for i in *.jpeg; do sips -s format png $i --out Doc/$i.png;done ###按比例缩放 sips -Z 600 goswift.png sips -z 300 600 goswift.png ###查看图片信息 file go-swift.png //文件信息 mdls go-swift.png //可以获取到图片详细信息 来源: oschina 链接: https://my.oschina.net/u/819364/blog/726414

Bin Bash Terminal script to resize PNG/CR2/JPG images using Mac SIPS with space saving check

萝らか妹 提交于 2019-12-12 04:36:48
问题 I made a cool little script to take my massive photo collection of JPG/PNG/CR2 (raw files) and convert them into MacBook Pro Retina resolution of 2880px JPEGs. This allows me to have all my pics on my computer while storing the giant originals on an external hard drive. Best of all the pics look fantastic because they're resized to my exact physical screen resolution 2880px wide! You can easily adapt the script to your own needs... OK so on to my question.... My pictures on my external hard

Can you remove the alpha channel in a PNG with SIPS?

吃可爱长大的小学妹 提交于 2019-12-11 05:36:35
问题 Trying to stay native in SIPS when removing the alpha channel from images I am familiar with the process in ImageMagick with: convert -flatten test.png test-white.png or: convert test.png -background white -alpha remove test.png but when I reference the man page on ss4 and Library it tells me that hasAlpa is a boolean read only when I run: sips -g hasAlpha test.png Per searching under the tag sips and with: sips transparency sips remove there wasn't anything mentioned for removing

How to programmatically make Mac OS X ICNS with 10 different images using sips or other

有些话、适合烂在心里 提交于 2019-12-06 13:58:43
问题 My issue is that i need have. I need to achieve this programmatically. So for mac os x an application icon should have these sizes: I have 10 images. Each one i placed a badge in the right corner, the placement and position of this badge does not scale. So i 10 different images. How to make a ICNS out of this? I thought to use sips, however sips only takes one file and it does all the scalings: http://cc.bingj.com/cache.aspx?q=mac+icns+sips+argument+list&d=5035141870911884&mkt=en-US&setlang

How to programmatically make Mac OS X ICNS with 10 different images using sips or other

∥☆過路亽.° 提交于 2019-12-04 19:58:52
My issue is that i need have. I need to achieve this programmatically. So for mac os x an application icon should have these sizes: I have 10 images. Each one i placed a badge in the right corner, the placement and position of this badge does not scale. So i 10 different images. How to make a ICNS out of this? I thought to use sips, however sips only takes one file and it does all the scalings: http://cc.bingj.com/cache.aspx?q=mac+icns+sips+argument+list&d=5035141870911884&mkt=en-US&setlang=en-US&w=n3PZcWn6bEPxt4O96PPLd6nugtVq5jDz Is there a way to make /usr/bin/sips take my 10 images and make

Use sips command on mac to trim bottom of image

爷,独闯天下 提交于 2019-11-30 11:32:32
I want to write a batch command script for osx that will crop off the bottom of an image. Is that possible using sips? I have a bunch of images 640 x 1136 and I want crop them (not scale or resize) to 640 x 960. When the image is cropped, I want the bottom of the image removed and the top to stay the same. Basically, I just want to cut the bottom of the image off. I have this but it's cropping both from the top of the image and bottom. sips --cropToHeightWidth 640 960 Doesn't look like it's possible. Thanks guys. It's only taken me 2 years to think this up... but you can do it with the GD

Use sips command on mac to trim bottom of image

巧了我就是萌 提交于 2019-11-29 17:48:47
问题 I want to write a batch command script for osx that will crop off the bottom of an image. Is that possible using sips? I have a bunch of images 640 x 1136 and I want crop them (not scale or resize) to 640 x 960. When the image is cropped, I want the bottom of the image removed and the top to stay the same. Basically, I just want to cut the bottom of the image off. I have this but it's cropping both from the top of the image and bottom. sips --cropToHeightWidth 640 960 回答1: Doesn't look like

How can I convert an image to grayscale via the command line? [closed]

梦想与她 提交于 2019-11-28 14:49:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . How can I use sips , imagemagic , or another tool to convert an image to black and white (grayscale) via the command line? 回答1: If you have imagemagick installed, convert source.jpg -colorspace Gray destination.jpg (true grayscale only) convert source.jpg -monochrome destination.jpg (true black and white)