Re: Photoshop Image Size
Re: Photoshop Image Size
- Subject: Re: Photoshop Image Size
- From: "Fleisher, Ken" <email@hidden>
- Date: Wed, 13 Dec 2006 16:26:43 -0500
- Thread-topic: Photoshop Image Size
Title: Re: Photoshop Image Size
Thanks for all of the suggestions. Unfortunately, I think you are still misunderstanding what I need to do. I already wrote some code to scale the IMAGE SIZE to 20 Mb, as you were suggesting (this is the same thing that the Resize File Size action does). Here is my code to do that:
-- Resize to 20 Mb
set oldUnits to ruler units of settings
set ruler units of settings to pixel units
tell doc20
set w to width
-- newWidth is calculated based on the following formulas
-- 20Mb = ( 3 * (prct*w) * (prct*h) ) / 1024^2
--newWidth = prct * w
set newWidth to ((20971520 / (w * height * 3)) ^ 0.5) * w
end tell
resize image doc20 width newWidth resolution 300 resample method bicubic sharper
set ruler units of settings to oldUnits
However, this changes the IMAGE SIZE to 20 Mb, which is based on the width and height in pixels, number of channels (3) and assuming an 8-bit bit-depth. If I have many layers, channels, etc., this calculation does not change, but if I save the file as a tiff and include layers and alpha channels, then the file size on disk will be much greater than 20 Mb even though the image size is still 20 Mb.
As I’ve said before, Photoshop provides an estimate of what this file size on disk will be in the lower left of the document window (or in the info palette if the option is turned on). This is the value I am trying to estimate, but I don’t know how much to allocate for the layers and channels because I don’t know how much space they will occupy.
Ken Fleisher
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden