Thursday, June 4, 2020

#1 2019-11-05 11:38:35 am

From:: South Tirol
Registered: 2008-07-04
Posts: 640

Sips - Scale pictures to specified mb

Sips offers no commands to up/downsample pictures to a specified size in mb.
So I had to play with pixels.

Sips - Z 4000 'path/to/picture'

.. Does the job, if I want a 1 MB picture from a smaller sized picture (e. G. 2560x1600) , which was already compressed at a rate of 80-90% "normal"
I'd love to instruct my script dynamically what the target file size my picture has to have in MB
I found this site :
Any chance to transcribe it into AS? big_smile



#2 2019-11-05 06:27:40 pm

From:: Nerima, Tokyo, Japan
Registered: 2004-05-30
Posts: 103

Re: Sips - Scale pictures to specified mb

I made an AppleScript to compress JPEG picture to target file size.

This script try to make an image with each compression rate jpeg image on memory and get the image data size.

How about this?

Model: MacBook Pro 2012
AppleScript: 2.7
Browser: Safari 13.0.1
Operating System: macOS 10.14

I wrote thousands of AppleScript to realize my idea. Natural language interface, voice recognition commander and so on. Though my mother toungue is strange language, Japanese, my most frequently write language is AppleScript. I believe it is for making things easy and powerful.

Filed under: resize, image



#3 2019-11-05 06:57:16 pm

Shane Stanley
From:: Australia
Registered: 2002-12-07
Posts: 6369

Re: Sips - Scale pictures to specified mb

if you're talking jpeg files, it's all largely guess-work -- the amount of compression depends on the image content. The only accurate way is trial-and-error.

Shane Stanley <>



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)