Hi.
I am working in photoshop and need to save an image as JPG
but it has to be under 65K. If it is over 65K then I need to reduce the
JPG quality settings until the file size is under 65K.
How can I do this (in a macro) without actually saving the file and checking the file size many times.
Thanks for your help.
Barry
Trying to dtermine file size before file is saved
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I don[t have photshop here, but am guessing this type of approach might work:
Do in macro what you do manually:
1. Save File
2. Wait Window Open if file is too big. Have a time out for Wait Window Open.
3. If no size message, then Time Out will allow macro to continue to save.
4. If size message window comes up, then use MessageModal to alert you.
---------------------------------
If no error messsage, can only check size after saved, then:
Save file
FileSize>.......
If File size >65 then open file again in same Image Editor, Else Done.
-------------------------------------------
Do in macro what you do manually:
1. Save File
2. Wait Window Open if file is too big. Have a time out for Wait Window Open.
3. If no size message, then Time Out will allow macro to continue to save.
4. If size message window comes up, then use MessageModal to alert you.
---------------------------------
If no error messsage, can only check size after saved, then:
Save file
FileSize>.......
If File size >65 then open file again in same Image Editor, Else Done.
-------------------------------------------
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!