Tuesday, November 19, 2019

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

Joy
Member
From:: South Tirol
Registered: 2008-07-04
Posts: 611
Website

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 : toolstud.io
Any chance to transcribe it into AS? big_smile

Offline

 

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

maro
Member
From:: Nerima, Tokyo, Japan
Registered: 2004-05-30
Posts: 34
Website

Re: Sips - Scale pictures to specified mb

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

http://piyocast.com/as/archives/5492

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

Offline

 

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

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 6034

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 <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)